-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Files uploaded to S3 external storage given 'Content-type: application/octet-stream', always #19487
Comments
S3 SDK tries to detect the mime type by the extension. Unfortunately the uri is server/lib/private/Files/ObjectStore/S3ObjectTrait.php Lines 87 to 91 in 5bf3d1b
I tried to set the content type at a earlier stage where the original filename is still available but somehow the information is lost 😞 |
Really annoying :/ Would be great if that would get fixed. |
Would it be sufficient to change |
Look here : https://docs.aws.amazon.com/aws-sdk-php/v3/api/function-GuzzleHttp.Psr7.mimetype_from_filename.html the function is deprecated, maybe there is a link to ? |
Steps to reproduce
Expected behaviour
Uploaded file is given a relevant content-type, based on extension or MIME
Actual behaviour
File is given
application/octet-stream
(The same file uploaded through the S3 web UI is given
image/png
correctly.Server configuration
Operating system: Ubuntu 18.04
Web server: NGINX
Database: MariaDB
PHP version: 7.3, I think
Nextcloud version: (see Nextcloud admin page) 18.0.1 (issue also present on 18.0.0)
Updated from an older Nextcloud/ownCloud or fresh install: Updated from 18.0.0
Where did you install Nextcloud from: https://hub.docker.com/r/linuxserver/nextcloud
Signing status:
Signing status
List of activated apps:
App list
Nextcloud configuration:
Config report
Are you using external storage, if yes which one: local/smb/sftp/... S3
Are you using encryption: no
Are you using an external user-backend, if yes which one: No
Client configuration
Browser: Firefox
Operating system: Arch Linux
The text was updated successfully, but these errors were encountered: