incorrect type for application/octet-stream .csv

472 views
Skip to first unread message

Alexis L.

unread,
Jan 16, 2017, 5:01:53 AM1/16/17
to back{4}app
Hello,
I'm saving a file using 

PFFile(name: "data.csv", data: fileContent!, contentType: "application/octet-stream .csv");


when downloading this file, the contentType header is incorrect...

 curl -v  https://parsefiles.back4app.com/[key]/foobar.csv

*   Trying 104.25.106.118...

* TCP_NODELAY set

* Connected to parsefiles.back4app.com (104.25.106.118) port 443 (#0)

* TLS 1.2 connection using TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256

* Server certificate: ssl375547.cloudflaressl.com

* Server certificate: COMODO ECC Domain Validation Secure Server CA 2

* Server certificate: COMODO ECC Certification Authority

> GET /71niOp6KGXds8MGSlb6puHMJGYjfhNGdy0wNx6zC/38b90a1fdb4ed89bd0eb56c7b4ee97e3_data.csv HTTP/1.1

> Host: parsefiles.back4app.com

> User-Agent: curl/7.51.0

> Accept: */*

< HTTP/1.1 200 OK

< Date: Mon, 16 Jan 2017 09:55:42 GMT

< Content-Type: text/csv


thanks!

casag...@back4app.com

unread,
Jan 19, 2017, 11:42:44 AM1/19/17
to back{4}app
Hello!

Have you tried their solutions, like it was passed in this link? https://github.com/ParsePlatform/Parse-SDK-JS/issues/311
Also, did you update your Parse SDK version?

Best!

Alexis L.

unread,
Jan 21, 2017, 1:04:29 AM1/21/17
to back{4}app
Hi Davi,
not sure what you mean, the solution offered by the OP, to override the mime headers when uploading the file?

If yes, as pointed out in the github thread, the problem is different. The headers when set on the client side are fine (same code runs correctly against parse.com). It's on the server side that the issue resides "... but users who upload Files directly depend on the server interpreting the type".

It's supposed to be fixed in Parse Server > 1.9.1.

The whole thread deals with the JS SDK though, maybe something was lost on the iOS/Android Client, and there's missing info passed to the server that prevent to interpret the mime type correctly?
Im using the latest parse server version, provided by back4app.
thanks!
Reply all
Reply to author
Forward
0 new messages