I would like to store json file to my amazon s3 and then retrieve it with ajax request. Unfortunately it seems s3 does not allow content-type application/json....
I should save my file as text/plain and then add header with php?
I would like to store json file to my amazon s3 and then retrieve it with ajax request. Unfortunately it seems s3 does not allow content-type application/json.... I should save my file as text/plain and then add header with php? |
|||
show 2 more comments |
I have found the problem. I was parsing the json in the wrong way.
Instead this works:
|
|||||
|
JSON.parse
. In the end, a file contains either text or binary data anyway. How to process the data is a decision the client has to make. – Felix Kling Jun 13 at 12:06