I’ve tried just about everything I could think of here. Any pointers on how to format my request to supply a custom path for an S3 file upload during entry creation? The docs do not give an example for adding any additional parameters during entry creation.
// Current code looks something like this and works fine for the entry + file
formData.append('data', JSON.stringify(data))
formData.append(`files.media`,
this.input.files[name].fileObject,
this.getFilename(name))
// I've tried a few things like the following, none seem to work:
formData.append(`files.media.path`, `uploads`)
formData.append(`files.path`, `uploads`)
formData.append(`path`, `uploads`)
Hey DMehaffy, thanks for the response. Here are my strapi deps from my package.json:
“strapi”: “3.1.4”,
“strapi-admin”: “3.1.3”,
“strapi-connector-bookshelf”: “3.1.3”,
“strapi-plugin-content-manager”: “3.1.3”,
“strapi-plugin-content-type-builder”: “3.1.3”,
“strapi-plugin-email”: “3.1.3”,
“strapi-plugin-upload”: “3.1.3”,
“strapi-plugin-users-permissions”: “3.1.3”,
“strapi-provider-upload-aws-s3”: “^3.1.5”,
“strapi-utils”: “3.1.3”,
“strip-ansi”: “^6.0.0”
I assumed “Upload file during entry creation” would be similar to “Upload files related to an entry” though that didn’t prove to be the case for me. I did try to look into the upload plugin code and the s3 provider but nothing obvious jumped out at me.
I was also digging in trying to find out how to add altText and captions for uploads during entity creation.
There is no fileInfo or metas being passed to enhancedFile in this uploadToEntity call. Is it possible that this is why path isn’t working as I was expecting?