fix(path resolution): now correctly looking in cwd
This commit is contained in:
parent
33670bb4d5
commit
21e85062f7
@ -37,7 +37,7 @@ const appendFormField = async (
|
|||||||
if (formDataField.type === "filePath") {
|
if (formDataField.type === "filePath") {
|
||||||
formDataArg.append("type", "image");
|
formDataArg.append("type", "image");
|
||||||
let fileData = plugins.fs.createReadStream(
|
let fileData = plugins.fs.createReadStream(
|
||||||
plugins.path.join(__dirname, formDataField.payload)
|
plugins.path.join(process.cwd(), formDataField.payload)
|
||||||
);
|
);
|
||||||
formDataArg.append("media", fileData, "upload.pdf");
|
formDataArg.append("media", fileData, "upload.pdf");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user