-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
support of base64 string in S3Adapter #600
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
What's the error that you get? If its |
I did not face any error, but the image uploaded on S3 is simply unreadable. |
@mchun does it work with |
It works with Parse.File("photo.jpg", { base64 : data }). But it would be great if it can be done via REST api too. |
ok, that's good to know, Did you try with the latest 'master"? |
Just tried with 2.1.3 and the problem still exists. |
I'll have a look |
@mchun we fixed a few things with the content type in recent releases, and I just checked, the base64 is properly restored as a buffer in the early middlewares. |
I have just tried 2.1.6, but sadly it is still not working...
where data is the following..(unlike what I described in the original post, my bad)
I have tried many thing, like removing "_" of ContentType inside data, changing the contentType of $.ajax to "image/jpeg", not stringifying the object....etc, but nothing works. Did I do anything wrongly? The file can be save successfully but it is not viewable. i.e., |
I try to save base64 file using REST, it seems not working |
In the current file adapter of api.parse.com, I can see that both file and base64 string are supported.
e.g. data = {"_ContentType":"image/jpeg","base64":"/9j/4AAQSkZJRgABAQAAAQ..........."}
and also
data = $("#ulPhoto1")[0].files[0];
I do rely on this a lot when performing client-side resize image function.
Can we do the same in the S3Adapter?
P.S. This is the code I used to upload image.
The text was updated successfully, but these errors were encountered: