I need to send an image that has been converted to base64 by JavaScript, to a server. Lets assume I don't know anything about the server, except where to send the data. The image is a .jpg
, so when JavaScript converted it, it prepended data:image/jpeg;base64
to the actual base64 data. So the result is something like this:
data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEA8ADwAAD/4V3gRXhpZgAATU0AKgAAAAg [...]
When researching on this topic, I found posts on SO that say keeping it will invalidate the base64 (here).
So, in general, should I strip the data:image/jpeg;base64
or keep it?