Is it possible to do the same with files uploaded to javascript via ajax?
Yes, ajax requests are treated like any other HTTP requests, and the responses will be automatically unpacked. You just need to send the same suitable headers Content-Encoding.
source
share