fix(path resolution): now correctly looking in cwd

This commit is contained in:
Philipp Kunz 2018-07-19 23:13:16 +02:00
parent 33670bb4d5
commit 21e85062f7

View File

@ -37,7 +37,7 @@ const appendFormField = async (
if (formDataField.type === "filePath") {
formDataArg.append("type", "image");
let fileData = plugins.fs.createReadStream(
plugins.path.join(__dirname, formDataField.payload)
plugins.path.join(process.cwd(), formDataField.payload)
);
formDataArg.append("media", fileData, "upload.pdf");
}