FILE

This forum contains topics that were moved from Get Satisfaction
NorulHidayu Binti Lazim
Posts: 0
Joined: Fri Dec 26, 2014 10:03 pm

FILE

Post by NorulHidayu Binti Lazim »

Hi, i really new in appery.io.

  1. how to upload multiple types of file in collection. In my collection, i set it as "assFile" with type "file". How to save it into the collection?

  2. I display all the asset in collection in listview where consist of video, audio, img and also doc. How to display each item in single page according type of item. For example,item in the listview, if the item is a image, when click on it, it will display in single page. if the item is a video, when click on it, it will display in single page and play the video.

    Please help me! Im running out of time! the apps is one of the requirement to pass and graduate. Thank you in advance!

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

FILE

Post by Illya Stepanov »

Hi -

We are suggesting to pass our tutorials first to better understand the platform:
:: http://devcenter.appery.io/tutorials/...

In database you always have a predefined collection 'Files', for more information please take a look here: http://devcenter.appery.io/documentat...

and here is more information how to upload and work with uploaded data: http://devcenter.appery.io/documentat...

NorulHidayu Binti Lazim
Posts: 0
Joined: Fri Dec 26, 2014 10:03 pm

FILE

Post by NorulHidayu Binti Lazim »

Thank you for fast reply..

i already read it but not really clear. To upload file via UI, can i just use file_upload service then store local storage.in response, i link the data from local storage to the "assFile" in other collection. Can i?

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

FILE

Post by Yurii Orishchuk »

Hello,

Here is a common way of using Files collection:

  1. Upload file to Files db collection.
    Here is tutorial about how to do it: http://devcenter.appery.io/tutorials/...

  2. Get URL to this uploaded file.

  3. Store this file URL to collection you need.

  4. Now you can get URL from this collection(3rd step). And use this URL as you need. For example if it image - use as image asset.

    So in this way - you upload file to Files collection and then store access information about this file in other collection you need.

    Regards.

Deon
Posts: 0
Joined: Sun Jun 30, 2013 6:00 am

FILE

Post by Deon »

Hi Yurrii

Your point no 2. How do you get the URL??

The Upload Service does not have a response like the camera service, which allows you to get the URL at time of upload?

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

FILE

Post by Yurii Orishchuk »

Hi Deon,

Sorry for this delay,

You should add following response parameters(see screen shot):
http://prntscr.com/8elg01/direct

Also you can do it automatically:
1 Upload file
2 Find request in browser debugger network tab
3 Copy actual service response.
4 Past this actual response in the service "test" tab.
5 Click "Import as response".
Details: http://prntscr.com/8elgqb/direct

Regards.

Post Reply