Possible duplicate:
How can you encode Base64 using Javascript?
I have a web application based on Java, Wicket and JQuery that has a function that allows users to upload files (images, pdfs, rtf) via multipart / form-data.
Our web security infrastructure filters out all HTTP traffic to get potential malicious content, for example. XSS attacks, SQL injection, buffer overflow, etc.
The filter does not distinguish between normal text input fields and file data, so it selects false positives from many downloaded binary files, preventing them from loading. I cannot change the security policy.
It seems that the best way to do this would be for the file data to be encoded in base-64, so they are sent with Content-Transfer-Encoding: base64, similar to what email clients do.
Is there a way to direct the browser to migrate the binary as base64 or some other non-binary format?
If not, can this be done manually using JavaScript?
javascript jquery html wicket
David
source share