-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Files saved with S3Adapter: Content-Type not set in S3 #1900
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
Comments
The PR I have made should fix the content type not going through. as for the |
Thanks for the fix @blacha. I am still new to node / npm. How would I go about using your PR branch before it's merged? I have tried changing my dependencies so that When I run Possibly linked to npm/npm#3055. Thanks! |
npm issues aside (I found a workaround), I confirm your commit fixed the issue for me. |
* Fixing #1900 JS SDK file upload JS SDK file upload uses req.body._ContentType to specify the upload content type * Fixing import statements * Dont clear the cache just delete the new entry that the test added. * adding E2E test for _ContentType support
Should be fixed now! Don't forget to include your current:
|
I am using latest parse server version and s3 direct access still facing the similar issue for example abc.jpg is renamed abc.jpg.txt when file is saved through web sdk. |
@manishsangwan what version of the SDK/parse-server are you using? Can you open a new issue and fill the issue template entirely? |
@flovilmart client sdk developer is looking into it. Will surely create a new issue if unresolved. Thanx. |
I have set up the S3 FileAdapter using this guide.
I can successfully create files using
new Parse.File("file.html", bytes, "text/html");
The files will appear in my S3 bucket, but with the Content-Type "text/plain" rather than "text/html" as expected.
parse-server 2.2.10
Edit: Also probably related to the same issue:
If I save a file without any extension, e.g.
new Parse.File("photo", bytes);
,.txt
will be appended to the file's name. The file's key in S3 will look like5658b255f1cb4413e6c84717adf79ebc_photo.txt
. This behaviour was not present with hosted Parse.The text was updated successfully, but these errors were encountered: