#Storage Manager: processFile add contentDisposition

6 messages · Page 1 of 1 (latest)

marble lodge
#

I need to add the contentDisposition option to my files as they are uploaded to s3. I cant seem to find how to add this to the processFile functionality. Any assistance on how to go about this would be greatly appreciated. I am using react.

copper isle
#

Hi @marble lodge can you provide more details of the processFile function you mentioned, is that a function you implemented yourself (as Amplify doesn't have such an API)?

Amplify Storage API uploadData supports contentDisposition parameter, for example:

uploadData({
  path: 'path/to/file/1.txt', 
  data: 'the file content,
  options:  {
    contentType?: 'text/plain',
    contentDisposition?: 'attachment',
  }
});
marble lodge
#

This is the documentation I am referencing @copper isle . It is related to Amplify's Storage Manager. I cant seem to find how to add my contentDisposition value to the processFile prop.

copper isle
#

Ahh, OK, thanks for clarifying, this is a functioanlity resides in the UI library.

#

I did a quick search on the UI library documentation, it doesn't seem to support the contentDisposition parameter, while the underlying Amplify Storage uploadData API does. Can you open a feature request here: https://github.com/aws-amplify/amplify-ui/issues