Support the ongoing development of Laravel.io →
Requests Input Installation
Last updated 1 year ago.
0

How are you sending it to Laravel ? file upload form post ?

0

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

Last updated 8 years ago.
0

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)

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.