Custom response type #1182
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I am working on something that will take a .zip file, transform it on a backend server , and then send back its contents to the user as a .zip.
I have found that I can do this outside of the FileUploader so that is an option but since the FileUploader is what I am using for the drag and drop and sending I was hoping there was a way I could incorporate this last part into my code.
Basically I need the response type to be 'blob' and right now it comes back as a string. Is there any way I am able to change what the response type is?
I was able to solve the first part of my problem with another issue listed here but now even though it works it does log an error in the console. Perhaps theres a way to add to the function to skip over this error?
So, to solve it myself in the meantime I changed the code to my own module:
inside of the _xhrTransport function:
to:
and added the following to the uploader
Looking at the documentation for XMLHttpRequest doing it the way I changed it to is the preferred method now anyways.
Source: https://javascript.info/xmlhttprequest#response-type