blob response type #766

Open
opened 2017-04-28 08:17:13 +00:00 by jakoito · 0 comments
jakoito commented 2017-04-28 08:17:13 +00:00 (Migrated from github.com)

hi there.
Please forgive me if i try to do things other way around.
Ma case is that i want to upload a file and get a file in return.
Almost everything works nice when i use the onCompleteItem just my excel file after download is broken.

When i change the xhr.responseType to "blob" in _xhrTransport method it works.

So maybe we should have second parameter in this method which will set the reponseType
that would be taken from new parameter in uploadItem?

update
never mind :) i fixed it with
this.uploader.onBeforeUploadItem = (item: FileItem) => {
item._xhr.responseType = "blob";
}

please delete :)

hi there. Please forgive me if i try to do things other way around. Ma case is that i want to upload a file and get a file in return. Almost everything works nice when i use the onCompleteItem just my excel file after download is broken. When i change the xhr.responseType to "blob" in _xhrTransport method it works. So maybe we should have second parameter in this method which will set the reponseType that would be taken from new parameter in uploadItem? update never mind :) i fixed it with this.uploader.onBeforeUploadItem = (item: FileItem) => { item._xhr.responseType = "blob"; } please delete :)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dc/ng2-file-upload#766