mo kam
Posts: 0
Joined: Tue May 26, 2015 1:45 pm

Uploading photo to personal website

Hi,

I have been messing around with photo taking and uploading using webupload..

How can I get an image taken from the camera uploaded to my own site?

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Uploading photo to personal website

Hello!

Please look at this tutorial, especially the last part Using Web API. https://devcenter.appery.io/documenta...
You can change the Appery.io db to your own if it provides rest api: https://devcenter.appery.io/documenta...

OldeDeBolde
Posts: 0
Joined: Sat Nov 21, 2015 11:39 pm

Uploading photo to personal website

Hi Evgene,

I am breaking my head on this a couple of months. Gave it up a couple of times and picked it up again, because I actually need this too.
I have the complete URL (http://example.com/example.png) stored in local storage.

Using the Webapi, what arguments do I have to change using my URL stored in local storage?

Could you help me with this? Appreciate your help.

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

Uploading photo to personal website

Hello -

[quote:]
I have the complete URL (http://example.com/example.png) stored in local storage.
[/quote]

Could you please elaborate here more? Provide us example of your code.

If you are using Web API in this case your image should be encoded into base64 string.

OldeDeBolde
Posts: 0
Joined: Sat Nov 21, 2015 11:39 pm

Uploading photo to personal website

Hi Illya,

I am using Web API described in https://devcenter.appery.io/documenta...

The uploadBinaryHelper function uses 4 arguments

  • datasource; in example above this holds the DB file collection, but I want to upload to my own website. Should I configure Fileupload_settings with the url of my website OR where other should I do this?

  • imageBase64Data (required) - a base64 string of the image. The picture taken with camera(service) is mapped to image_base64

    Image

    name will be read from a localstorage with get()
    type should be PNG

    If file exists it should overwrite!

    I call the function:

    uploadBinaryHelper(webupload, Apperyio.storage.image_base64.get(), Apperyio.storage.webImg.get() , ".png" );

    But nothing is happening.

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Uploading photo to personal website

Hello,

That function works only for Appery.io database. If you want to send files to your own server - you can use simple REST service.

Should I configure Fileupload_settings with the url of my website OR where other should I do this

Sure, you have to set all parameters of your server there.

OldeDeBolde
Posts: 0
Joined: Sat Nov 21, 2015 11:39 pm

Uploading photo to personal website

Sergiy,

Can you help me specifying those parameters? What do I have to fill in where? Where do I have fill in the url of my website? I need some directions. I appreciate your help!

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Uploading photo to personal website

1) It depend on API of that website. It is impossible to send a file trough ftp protocol. You have to have special API for that
2) fileupload_settings has parameters, which are related to Appery.io database, such databaseID and so on, so they are not used in your website

OldeDeBolde
Posts: 0
Joined: Sat Nov 21, 2015 11:39 pm

Uploading photo to personal website

Hi sergiy, any idea if wordpress has a standard api or plugin for this?

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Uploading photo to personal website

We are very sorry, but this is something outside the scope (http://devcenter.appery.io/support-po...) of our standard support. Please search online for appropriate solution.

Return to “Issues”