Skip to content
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

Upload to Cloud Files #2892

Closed
cyberduck opened this issue Jan 13, 2009 · 5 comments
Closed

Upload to Cloud Files #2892

cyberduck opened this issue Jan 13, 2009 · 5 comments
Assignees
Labels
bug cloudfiles Rackspace CloudFiles fixed
Milestone

Comments

@cyberduck
Copy link
Collaborator

anonymous created the issue

When I upload a .jpg with Cyberduck to Mosso Cloud Files and then try to view it with through the CDN with Firefox, it prompts me to download it.

When I do the same thing with a .png it works fine and displays in the browser like it should.

Can we get Cyberduck to the file type on upload appropriately on .jpg and any other files to they are served appropriately?

@cyberduck
Copy link
Collaborator Author

@dkocher commented

I properly get a image/jpeg in the Content-Type header returned when accessing a JPEG in my Mosso Container. Also when debugging Cyberduck, it does set the content type when uploading a JPEG for me. So I cannot replicate this. Will check with Mosso for possible reasons this might fail.

@cyberduck
Copy link
Collaborator Author

@cyberduck
Copy link
Collaborator Author

93e4b56 commented

So with some more testing, it appears as if the the user uploads a JPEG with a file extension of .JPG or .JPEG (upper case), the content-type is not being set and defaulting to application/octet-stream.

This does not seem to be isolated to Cyberduck. Uploading through Mosso's web interface also breaks with a .JPEG file extension (although they did handle .JPG). I suspect the mime/content type determination is based on file extension rather than the files "magic number".

@cyberduck
Copy link
Collaborator Author

93e4b56 commented

Grep'ing through the Cyberduck source, I'm wondering if this is a case-senstivity issue? It seems like the source consults a lib/mime.types file. That file looks like it would map "jpeg jpe jpg" to content-type "image/jpeg". So if the source file is .JPG or .JPEG the match is failing?

@cyberduck
Copy link
Collaborator Author

@dkocher commented

In 5bad61f. This fix also applies to content uploaded to S3.

@iterate-ch iterate-ch locked as resolved and limited conversation to collaborators Nov 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug cloudfiles Rackspace CloudFiles fixed
Projects
None yet
Development

No branches or pull requests

2 participants