Skip to content

Commit bd3923b

Browse files
committed
add: meistertask, pdffiller, pixelbin
1 parent 30630a8 commit bd3923b

File tree

3 files changed

+4
-15
lines changed

3 files changed

+4
-15
lines changed

components/meistertask/actions/create-attachment/create-attachment.mjs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,6 @@ export default {
4949
optional: true,
5050
},
5151
},
52-
methods: {
53-
checkTmp(filename) {
54-
if (filename.indexOf("/tmp") === -1) {
55-
return `/tmp/${filename}`;
56-
}
57-
return filename;
58-
},
59-
},
6052
async run({ $ }) {
6153
const {
6254
taskId,
@@ -65,11 +57,10 @@ export default {
6557
} = this;
6658

6759
const data = new FormData();
68-
const path = this.checkTmp(filepath);
6960

7061
const {
7162
stream, metadata,
72-
} = getFileStreamAndMetadata(path);
63+
} = getFileStreamAndMetadata(filepath);
7364
data.append("local", stream, {
7465
contentType: metadata.contentType,
7566
knownLength: metadata.size,
@@ -83,6 +74,7 @@ export default {
8374
};
8475

8576
const response = await this.meistertask.createAttachment({
77+
$,
8678
taskId,
8779
data,
8880
headers,

components/pdffiller/actions/upload-document/upload-document.mjs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import FormData from "form-data";
22
import { getFileStreamAndMetadata } from "@pipedream/platform";
3-
import { checkTmp } from "../../common/utils.mjs";
43
import pdffiller from "../../pdffiller.app.mjs";
54

65
export default {
@@ -28,7 +27,7 @@ export default {
2827
async run({ $ }) {
2928
const {
3029
stream, metadata,
31-
} = getFileStreamAndMetadata(checkTmp(this.file));
30+
} = getFileStreamAndMetadata(this.file);
3231
const data = new FormData();
3332
data.append("file", stream, {
3433
contentType: metadata.contentType,

components/pixelbin/actions/upload-file/upload-file.mjs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,6 @@ export default {
6363
uploadFile(args = {}) {
6464
return this.app.post({
6565
path: "/upload/direct",
66-
headers: {
67-
"Content-Type": "multipart/form-data",
68-
},
6966
...args,
7067
});
7168
},
@@ -106,6 +103,7 @@ export default {
106103
const response = await uploadFile({
107104
$,
108105
data,
106+
headers: data.getHeaders(),
109107
});
110108

111109
$.export("$summary", `Successfully uploaded file with ID \`${response._id}\`.`);

0 commit comments

Comments
 (0)