Get Response Data

Started by Medienopfer982 replies2,007 views
Medienopfer98Original post
#1

I have a problem and just cant solve it. I use uppy and try to use my data from the response in the On-Complete-Method. I mean this: .on(‘complete’, (result) … In my response there is a data variable called html. I want to append this html after successful upload. But this data is missing in the result variable. I also tried it with getResponseData (xhr), but had no luck with this. Hope somebody can help me.

artur
#2

Hi! Sorry for the delay. In recent release 0.23.2, we’ve added a response key to files in result.successful array:

49%20PM

Can your key be found there? It should also be available in xhr object via the getResponseData function that you mentioned, if you are not returning JSON. Have you seen this paragraph in docs: https://uppy.io/docs/xhrupload/#getResponseData-xhr? Can you specify what response are you getting?

Medienopfer98
#3

ok i did the update… now it is there… im have to do a big refactoring right now and after that i will come back to uppy testing. but it seems it will work now 🙂 thx