Open jyang0 opened 8 years ago
The hyperlink is currently of the form: /home/ubuntu/eh_preprod/... (I didn't break it, it used to be /var/www/...).
Expected behaviour:
When a user requests a file (there needs to be a special GET link for this, like /account/attachment/...): -- Get file checksum from db
-- Using file checksum, see if file exists in cache directory.
---- If it exists, redirect to new URL pointing to attachment to be served by nginx
---- If it does not exist, retrieve file from database, save in cache folder, and redirect like above
The hyperlink is currently of the form: /home/ubuntu/eh_preprod/... (I didn't break it, it used to be /var/www/...).
Expected behaviour:
When a user requests a file (there needs to be a special GET link for this, like /account/attachment/...): -- Get file checksum from db
-- Using file checksum, see if file exists in cache directory.
---- If it exists, redirect to new URL pointing to attachment to be served by nginx
---- If it does not exist, retrieve file from database, save in cache folder, and redirect like above