@nger/fk-upload 1.0.31 → 1.0.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -60,8 +60,7 @@ let TaskService = class TaskService {
|
|
60
60
|
this.redis.set(filename, `0`);
|
61
61
|
}
|
62
62
|
async addEffectTask(task) {
|
63
|
-
const content = Buffer.from(JSON.stringify(task));
|
64
|
-
await this.rabbit.send('@nger/fk-upload/effect-task', content);
|
63
|
+
// const content = Buffer.from(JSON.stringify(task)); // await this.rabbit.send('@nger/fk-upload/effect-task', content)
|
65
64
|
}
|
66
65
|
async addScheduleTask(task) {
|
67
66
|
const content = Buffer.from(JSON.stringify(task));
|
@@ -169,7 +168,7 @@ let TaskService = class TaskService {
|
|
169
168
|
const isShouldRunning = isComplete || (!isComplete && task.index == taskIndex);
|
170
169
|
if (isShouldRunning) {
|
171
170
|
// should handler
|
172
|
-
const fileStream = (0, fs_extra_1.createReadStream)(task.path, { start: task.start, end: task.end });
|
171
|
+
const fileStream = (0, fs_extra_1.createReadStream)(task.path, { start: task.start, end: task.end, encoding: 'utf8' });
|
173
172
|
const formdata = new form_data_1.default();
|
174
173
|
formdata.append('ctrl', fileStream);
|
175
174
|
formdata.append('isFreeVer', this.encodeURIComponent(false));
|