I POST the entire string of the variable data
mentioned above. And I am receving it in Laravel with Input::get() and not Input::file()
So it is basically a very long string received on the Laravel side too, do I need to decode it back to an image and save to a file path? If yes how do I do that?
Thanks very much
I do not see anything in the JavaScript that says you are encoding the data.
I think you will lose part of the unseen binary data if you use a standard form input string.
If you must use a string, then you will likely need to base64 encode the string on the JavaScript side then decode it on the Laravel side to save the data.
base64 is the safest way to transfer binary data if your not using the multi-part form upload.
You can decode it, then save it to a file or store it in a blob field in a db, or just save the string (though it will be larger than the decoded version)
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community