I receive a request (multipart/form-data POST), parameter "file" contains file as a base64 (example below)
------WebKitFormBoundaryEA37wQGzpnprPt8x\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\nJVBERi0xLjQNJeLjz9MNCjEgMCBvYmoNPDwvQXV0aG9yIChNYXJrbyBLZWpcMjM2YXIpL0Ny\r\nZWF0aW9uRGF0ZSAoRDoyMDE2MTEyMjExMzc0NCswMScwMCcpL0NyZWF0b3IgKE1TIFdvcmQg\r\nRG9jdW1lbnQ
I am curious how to decode it (using JAVA of course) from there and get a file.
- Should I somehow delete system information (WebKitFormBoundary and Content-Disposition)?
- I also noticed that content full of \r\n Do I need to delete it myself as well?