How to allow downloading huge file in a website only after authentication?

61 Views Asked by At

I have a website where users need to see a link to download a file (approximately 100 MB size) only after authenticating (userid/password) themselves in the website. Users should not be able to copy the link and use it later without authentication.

  1. Can a REST API with (Transfer-Encoding: chunked) return such a huge file size without being timed-out? Note: We currently have java springboot based APIs for some basic functions returning JSON (text) response

  2. How can I prevent the URL from being accessed later without authentication ?

  3. Any approach to generate dynamic URLs which will be valid only for few mins ? Should this logic be in the app server or CMS like Drupal have this feature ?

I am open to store this file in DB or Drupal or a file server as per the recommended approach for securely download the file. This file is not text/image/pdf, it will be a binary file.

Note: My system does not use any Public Cloud like AWS/GCP/Azure

0

There are 0 best solutions below