Search found 7 matches

Go to advanced search

by vijay6640949
Thu Feb 13, 2014 8:00 am
Forum: Issues
Topic: service execute parameters
Replies: 1
Views: 266
 
Jump to post

service execute parameters

Hi, I am trying to invoke a service from javascript. service URL is {database_url}/files/{file_name} Code to invoke: function takePhoto2() { // Retrieve image file location from specified source navigator.camera.getPicture(uploadPhoto2, function(message) { alert('get picture failed'); }, { quality: ...
by vijay6640949
Thu Feb 13, 2014 5:44 am
Forum: Issues
Topic: Upload photo using Cordova FileTransfer
Replies: 18
Views: 2321
 
Jump to post

Upload photo using Cordova FileTransfer

ok, I tried what you suggested...still no luck. var headers = { "X-Appery-Database-Id": '...', "X-Appery-Session-Token": "'" + localStorage.getItem("userSessionToken") + "'", "Content-Type": "image/jpeg" }; options.headers = heade...
by vijay6640949
Thu Feb 13, 2014 4:54 am
Forum: Issues
Topic: Upload photo using Cordova FileTransfer
Replies: 18
Views: 2321
 
Jump to post

Upload photo using Cordova FileTransfer

Hi,

In my code, I am sending the parameters as part of header.

var url = "https://api.appery.io/rest/1/db/files......"
url += "&X-Appery-Session-Token=" + localStorage.getItem("userSessionToken");
url += "&Content-Type=image/jpeg";

by vijay6640949
Wed Feb 12, 2014 7:55 am
Forum: Issues
Topic: Upload photo using Cordova FileTransfer
Replies: 18
Views: 2321
 
Jump to post

Upload photo using Cordova FileTransfer

I tried not to use params and instead updated the url to... function uploadPhoto(imageURI) { var options = new FileUploadOptions(); options.fileKey = "file"; options.fileName = imageURI.substr(imageURI.lastIndexOf('/') + 1); options.mimeType = "image/jpeg"; var params = {}; optio...
by vijay6640949
Wed Feb 12, 2014 7:29 am
Forum: Issues
Topic: Upload photo using Cordova FileTransfer
Replies: 18
Views: 2321
 
Jump to post

Upload photo using Cordova FileTransfer

Hi, I am trying to upload photo to the Files database, but I get a failure in ft.upload() in the code below. The error code is 3. I can't seem to find any issue with the code below. Any ideas? It will be good to have a tutorial that shows how to upload a picture taken with the device camera to the F...
by vijay6640949
Mon Feb 10, 2014 2:33 am
Forum: Issues
Topic: Image upload to Files collection
Replies: 4
Views: 376
 
Jump to post

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 t...
by vijay6640949
Thu Feb 06, 2014 7:28 am
Forum: Issues
Topic: Image upload to Files collection
Replies: 4
Views: 376
 
Jump to post

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

Go to advanced search