Password protected file downloads with Amazon S3 and presigned requests.



  • I hope some of you can accelerate my dev cycle by pointing me in the right direction. I'm looking to add a feature where a user can upload a file, similar to the existing nodebb-plugin-s3-uploads-updated. However, instead of the public S3 upload and link, it should be uploaded with private permissions and a download button that creates a presigned get request. See images below:

    before:
    0_1542388602611_download.png

    after:
    0_1542388643747_secure-download.png



  • This will prevent users without the proper group membership from accessing the category and downloading the file. It will also ensure that the download can only happen from my site. In this way, if a user's membership status is changed, then he wouldn't be able to access the file by accessing the S3 object url.

    0_1542389062982_fc114844-9564-46f8-81b7-d17f7609c991-image.png


Log in to reply
 

Suggested Topics

  • 1
  • 6
  • 1
  • 6
  • 11
| |