Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- upload = function (imageURI) {
- var ft = new FileTransfer(),
- options = new FileUploadOptions();
- options.fileKey = "file";
- options.fileName = 'filename.jpg'; // We will use the name auto-generated by Node at the server side.
- options.mimeType = "image/jpeg";
- options.chunkedMode = false;
- options.params = { // Whatever you populate options.params with, will be available in req.body at the server-side.
- "description": "Uploaded from my phone"
- };
- // alert(imageURI);
- // alert(serverURL);
- ft.upload(imageURI, serverURL + "/images",
- function (e) {
- getFeed();
- },
- function (e) {
- alert("Upload failed");
- }, options);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement