Created
April 12, 2017 22:25
-
-
Save ulizama/0e6da3648b36e57c12681f21d9ef7f28 to your computer and use it in GitHub Desktop.
Upload file example on Titanium
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var xhr = Ti.Network.createHTTPClient(); | |
xhr.onload = function(e) { | |
}; | |
xhr.onerror = function(e){ | |
}; | |
xhr.open('POST', 'https://url'); | |
var requestParams = {}; | |
requestParams.avatar = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory,'_new_avatar.jpg'); | |
requestParams.requestTime = new Date(); | |
xhr.send(requestParams); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment