Terry Gilliver
Posts: 0
Joined: Fri Apr 18, 2014 8:45 pm

File upload plugin

Trying to use this plugin. I have the camera component working great. I used the following javascript attached to my upload button:

codeuploadBinaryHelper(menuUpload, Apperyio.storage.image_base64.get());/code

where menuUpload is my service (CordovaFileUpload service). The service terminates successfully, but when I check the files collection, it has not been updated. Am I missing something?

Terry Gilliver
Posts: 0
Joined: Fri Apr 18, 2014 8:45 pm

File upload plugin

I also noted that there are two other functions in the javascript 'FileUploadHelper.js' namely isCordovaApp and uploadPhoto. What are these functions used for?

Terry Gilliver
Posts: 0
Joined: Fri Apr 18, 2014 8:45 pm

File upload plugin

I have followed the instructions at https://devcenter.appery.io/documenta..., but it just doesn't seem to upload the image to the files collection, can anyone help?

Terry Gilliver
Posts: 0
Joined: Fri Apr 18, 2014 8:45 pm

File upload plugin

Ok, I seem to be getting somewhere now, leave it with me

Terry Gilliver
Posts: 0
Joined: Fri Apr 18, 2014 8:45 pm

File upload plugin

Still having problems...
Image

The camera button takes the photo and puts the image into the image component.

The camera service request mapping is as follows:

Image

The response mapping is:

Image

The image uri is saved both to the image component and the image_uri storage variable.

The upload button invokes the Cordova upload Service. The request mapping is:

Image

The js for the database id and masterkey are:
return FileUpload_settings.database_id &
return FileUpload_settings.database_master_key respectfully.

The response mapping is:

Image

The output is to a label on the page.

After attempting an upload, the label has a value of undefined and the files collection is not updated.

Terry Gilliver
Posts: 0
Joined: Fri Apr 18, 2014 8:45 pm

File upload plugin

The FilesUpload_settings has it values set correctly

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

File upload plugin

Hi Terry -

You will need to check if the image actually saved in your storage variable, it could exceed the 5Mb limit of storage variable.

Terry Gilliver
Posts: 0
Joined: Fri Apr 18, 2014 8:45 pm

File upload plugin

Since it is stored in local storage on the device and it can't be tested in a normal browser, how can I check this?

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

File upload plugin

Hi Terry,
you can check lsv on device with Weinre

Terry Gilliver
Posts: 0
Joined: Fri Apr 18, 2014 8:45 pm

File upload plugin

I have connected with weinre and have located the local storage which gives me the uri of the image, I have located the photographs on my device and they are all around the 55Kb mark, and can be opened on the device with no problem. I guess, i do not have a size problem.

Return to “Issues”