Page 1 of 1

FILE

Posted: Sun Jan 11, 2015 2:42 am
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!


FILE

Posted: Sun Jan 11, 2015 5:11 am
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...


FILE

Posted: Sun Jan 11, 2015 9:56 am
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?


FILE

Posted: Mon Jan 12, 2015 4:08 am
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.


FILE

Posted: Mon Aug 31, 2015 7:55 am
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?


FILE

Posted: Thu Sep 10, 2015 5:01 am
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.