how to post camera photo file to parse.com?
Uploading files to Parse: http://help.tiggzi.com/documentation/...
Catch up wih the Appery.io community on our forum. Here you'll find information on the lastest questions and issues Appery.io developers are discussing.
https://forum.appery.io/
Uploading files to Parse: http://help.tiggzi.com/documentation/...
This is great! Although I think there might be a step missing. I don't see anything that mentions how to call the Select File function from a Click event on the Select File button.
Updated. You need to add this code on button click:
$('#fileselect').trigger('click');
I followed the example. Looks great and works when I test on a PC. However, when I test on my mobile device from the Tiggzi Android app it does not open a file explorer or gallery or anything. Is there perhaps a work around for this?
The app should work on Mobile Safari or Mobile Firefox, I think also Chrome (mobile) -- as those are the browsers that support the File API used in the example. It will not work yet as a hybrid app.
So is there no way of doing this kind of thing in an app environment? I see there is the camera service but I can't find a tutorial to use it. Will this maybe work?
Hello! Is this what are you looking for http://help.gotiggr.com/documentation...?
Great! Thats what I was looking for. Seems to work! Should be able to send a base64 to my Parse DB. Thanks!
Ok I'm having a boat load of trouble with the base64
1) I'm not sure what my type should be for my base64 field in my class.
2) Not sure how to send it along with normal text. I'm not sure about the javascript. Nothing I tried works. This was my latest attempt.
precode
curl -X POST \
-H "X-Parse-Application-Id: my key" \
-H "X-Parse-REST-API-Key: my key" \
-H "Content-Type: application/json" \
-d '{"name":"Jerry","image64":{"__type":"Bytes","base64":"some base64 formatted data"}}' \
https://api.parse.com/1/classes/MyClass
/code/pre
This also won't work
precode
var beerService = new Tiggr.RestService({
'url': 'https://api.parse.com/1/classes/beer',
'dataType': 'json',
'type': 'post',
'contentType': 'application/json',
});
var abeername = localStorage.getItem('beername');
var abeer64 = localStorage.getItem('img64');
var datasources = [];
restservice12 = new Tiggr.DataSource(beerService, {
'onComplete': function(jqXHR, textStatus) {
$t.refreshScreenFormElements("j_48");
},
'onSuccess': function(data) {},
'onError': function(jqXHR, textStatus, errorThrown) {},
'responseMapping': [],
'requestMapping': [{
'PATH': ['X-Parse-Application-Id'],
'HEADER': true,
'ATTR': 'mykey'
}, {
'PATH': ['X-Parse-REST-API-Key'],
'HEADER': true,
'ATTR': 'mykey'
}, {
'PATH': ['name'],
'ID': abeername,
'ATTR': 'value'
}, {
'PATH': ['img'],
'__type': 'Bytes',
'base64': abeer64
}]
});
datasources.push(restservice12);
/code/pre