vijay6640949
Posts: 0
Joined: Thu Feb 06, 2014 7:28 am

Image upload to Files collection

Hi there!

I have a question on uploading an Image to the Files collection.

I have added a image file as an asset to an Image UI control. How do I get the file name, content type and image data in Javascript so that I can send those as request to the Files create service?

Thanks!
VJ

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Image upload to Files collection

Hi Vijay,

If I understand you correctly, you need a path to an image uploaded via Appery.io Media Manager.

If the image is loaded as an asset you can use the following path: "files/views/assets/image/someimage.png".

This can also help you:
http://docs.appery.io/javascript-api/...

vijay6640949
Posts: 0
Joined: Thu Feb 06, 2014 7:28 am

Image upload to Files collection

Hi Katya,

I am trying to achieve something different. I want to upload a photo taken by the phone's camera to the files.

My current application can take a photo and write it to the Image UI component (http://docs.appery.io/documentation/u...). Now I want to do something like what is done in this tutorial - http://docs.appery.io/tutorials/uploa.... In that tutorial, section "Uploading files", step 2, there is a mapping between UI components on the right to the service request on the left. The mapped UI components are textbox for fileName, fileContentType, fileContent. I like to know if it is possible to use an Image instead of those textboxes.

Thanks,
Vijay

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Image upload to Files collection

Hi Vijay,

Unfortunately this is a bug, we'll fix it as soon as possible.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Image upload to Files collection

Hello!

Upload files tutorial was updated, please take a look http://docs.appery.io/tutorials/uploa...

Return to “Issues”