Jake Hare7049642
Posts: 0
Joined: Sun Aug 17, 2014 10:09 pm

'List Service' functionality for uploaded files to DB?

I followed the instructions for letting users upload files to the appery DB. Now I want the user to see a list of the 'original file name' of the files they uploaded, and also give them the ability to delete those files (similar to the to-do app).

Is there an easy way to do this? I only see the 'Read Service' available for the files DB.

Thanks!

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

'List Service' functionality for uploaded files to DB?

Hi Jake,

Please check our File API section in our docs for achieving this:
:: http://devcenter.appery.io/documentat...
:: http://devcenter.appery.io/documentat...

Jake Hare7049642
Posts: 0
Joined: Sun Aug 17, 2014 10:09 pm

'List Service' functionality for uploaded files to DB?

Thanks! I'll try it and let you know.

Jake Hare7049642
Posts: 0
Joined: Sun Aug 17, 2014 10:09 pm

'List Service' functionality for uploaded files to DB?

I tried the listing, but it didn't work. See these screenshots for a more thorough explanation. I want only the user who uploaded the file to see it in the list.

Image Image Image

Jake Hare7049642
Posts: 0
Joined: Sun Aug 17, 2014 10:09 pm

'List Service' functionality for uploaded files to DB?

I tried with a session token as well and get the same error

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

'List Service' functionality for uploaded files to DB?

Hi Jake,

I see a culprit of your problem(you have passed wrong session token parameter): http://prntscr.com/4iirbr/direct

Also i've checked this service and it works perfectly.

Here is my screen shots, check out them:

1 settings tab: http://prntscr.com/4iirjz/direct

2 request tab: http://prntscr.com/4iirnh/direct

3 test tab: http://prntscr.com/4iirra/direct

Regards.

Jake Hare7049642
Posts: 0
Joined: Sun Aug 17, 2014 10:09 pm

'List Service' functionality for uploaded files to DB?

Hi Yurii,

I'm not sure how yours worked; I see two strange things with yours:

  1. In your request tab, you show {database_id} in the session token field, and a random number which I assume is some other database id in that field.

  2. In the test tab, what number is it that you're using as the session token? I thought the session token was the same as a user's _id.

    Thanks,

    Jake

Jake Hare7049642
Posts: 0
Joined: Sun Aug 17, 2014 10:09 pm

'List Service' functionality for uploaded files to DB?

Here's the request tab with the test above:
Image

Jake Hare7049642
Posts: 0
Joined: Sun Aug 17, 2014 10:09 pm

'List Service' functionality for uploaded files to DB?

I figured it out; the problem was I did not know the difference between the user _id and the session token. Once I figured that out I used the 'login service' to find a valid session token to test, and now it works fine.

Thanks!!!

Return to “Issues”