Active
Project:
Flysystem - S3
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
28 Apr 2020 at 07:41 UTC
Updated:
2 Feb 2022 at 15:09 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
mikkmiggur commentedComment #3
hkirsman commentedImages and probably some other types as well should not be forced to download. Adding mime type to all files and before enforcing content-disposition, check if it's of type 'application/*'.
Comment #4
leon kessler commentedCould you explain a bit more why this is required?
If Drupal renames a file, because there is a duplicate, then the file must be stored with its new name in S3.
I've referenced another issue here, related to the file renaming in CORS uploads.
Comment #5
mikkmiggur commentedOne use case for that is when we have downloadable software stored in the S3. For example something like that software_name.exe.
In case you need to upload the same file again for whatever reason (hotfix, wrong file, etc) Drupal will upload it with prefix _0, _1, and so on.
But we need that users can still download that file with the same original name and without Drupal created prefix.
Maybe it will be more correct to have a settings checkbox for that functionality to turn it on/off.
Comment #6
leon kessler commentedTo me, this sounds like you have bespoke functionality that should probably be implemented outside of this module. Eg you could look at using https://www.drupal.org/project/file_replace
We are only trying to replicate Drupal cores file handling and not really adding any additional functionality on top (other than using of a different file system).
That being said, I still don’t see an issue with the patch, and will take another look at it soon (as I’ll be working on updating some of the CORS file handling).
Comment #7
mikkmiggur commentedIf it feels too specific functionality then please let's close this ticket "Works as designed" and we will continue to heave that functionality with that patch file.