-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
I can get a base64 code for a image, how i can upload this image by base64 code #3832
Comments
We try to use GitHub issues solely for bug reports. Please use StackOverflow for help questions, and use the correct tags (parse-server, for example). |
I have the same issue. I believe this is a bug? |
@doender if you upload an encoded file to parse-server it will not decode it for you. This is not a bug. Whatever is in the file you upload is what the file will retain when you download. If you want your file to to be accessible as a JPG, PNG, PDF, or any other format be sure to set:
If you upload encoded data, like in base64, the file you will get later will be exactly that, base64 encoded data. In that case you would have to decode that data client side first before viewing. |
addfiles(imagebase64):Observable {
let url = "http://XXXXX:1337/parse/files/111.jpg"
let addHeader = new Headers();
addHeader.append("X-Parse-Application-Id","XXXXX")
addHeader.append("X-Parse-Master-Key","XXXXX")
addHeader.append("Content-Type","plain/text")
return this.http.post(url, JSON.stringify({_ContentType: 'image/jpeg', base64: imagebase64}),{headers: addHeader})
}
And ,the file upload successfully,but when I open it ,it is string not a jpg ,how to do with it ?
The text was updated successfully, but these errors were encountered: