Tassilo Posegga
Posts: 0
Joined: Wed Nov 26, 2014 4:44 pm

Get fileurl of uploaded file

I am trying to retreive the fileurl of an uploaded file.

For uploading a file I trigger a Javascript (uploadMultipleFilesHelperNew) with my uploadservice. On success of the uploadservice I am trying to map a parameter "fileurl" which I added to my uploadservice.

Image

In Chrome's developer console I've seen that the response parameter should be right,
Image

but I get this error:

Image

I need this to set the file reference (url) in a custom collection afterwards.

Egor Kotov6832188
Posts: 0
Joined: Wed Nov 19, 2014 5:15 pm

Get fileurl of uploaded file

You need to pass session token to that url or master key of your DataBase
https://api.appery.io/rest/1/db/files...\
[?][encoded="base64"][&][sessionToken=]\
[&][masterKey=]

Tassilo Posegga
Posts: 0
Joined: Wed Nov 26, 2014 4:44 pm

Get fileurl of uploaded file

I can uploadfiles but I need the fileurl as response! I was able to solve it with this Javascript code in uploadfileservice success:

Code: Select all

         Apperyio.storage.lastUploadedFile.set(data[0].success.fileurl); 

This is working fine in the browser! But the native Android App will throw this error:

Image

So I need a proper solution for MAPPING the RESPONSE of the UPLOAD SERVICE of the FILE collection in the database.

The files chosen on Android device are not uploaded to the files collection at all. See my Application "ShareFrogg"

Egor Kotov6832188
Posts: 0
Joined: Wed Nov 19, 2014 5:15 pm

Get fileurl of uploaded file

We have bug for File upload that will be fixed in December 2014.
See this workaround code https://getsatisfaction.com/apperyio/...

Return to “Issues”