Page 1 of 1

Urgent Help Needed - File Upload

Posted: Tue Sep 01, 2020 7:27 pm
by dtan

I have a function in my app that lets the user take a picture and upload it to the database. I'm using the Cordova file upload plug-in and it works great. The problem is i need the filename back from the service so i can store it in another table that references that photo. No matter what I do, I can't get it back from the service. I setup the service response as an array as directed by support and found elsewhere on this forum, but the filename just won't populate the local variable. I know the response is an array, do i need to do something with the array before mapping the filename field from the response to my variable in the service success mapping? I will only ever be 1 file at a time that is uploaded and saved.


Re: Urgent Help Needed - File Upload

Posted: Wed Sep 02, 2020 1:12 pm
by Serhii Kulibaba

Hello,

Please add the TypeScript on the success event of the upload service:

Code: Select all

alert(JSON.stringify(res));

The variable "res" contains a full response of the upload file request


Re: Urgent Help Needed - File Upload

Posted: Sun Sep 13, 2020 8:10 am
by valery121

Cordova is being developed as far as I know from the platform https://aduk.de/ ... maybe ask them)