I'm facing an issue while attempting to upload a file to a server - the process seems successful, but the file doesn't actually transfer. I've temporarily hard-coded some values, but here's the code snippet:
var options = new FileUploadOptions();
options.fileKey = "file";
options.fileName = "readme.txt";
imageURI = "C:\\Users\\me\\AppData\\Local\\Packages\\MyApp_68mjwy0kbd4mc\\LocalState\\readme.txt"
options.mimeType = "text/plain";
options.httpMethod = "POST";
options.chunkedMode = false;
var ft = new FileTransfer();
ft.upload(imageURI, encodeURI("http://example.com/upload/upload.php"), fileUploadWin, fileUploadFail, options);
Upon examining Fiddler, I noticed that two file names are being set:
-----------------------------7de36c253902b2 Content-Disposition: form-data; name="source";filename="readme.txt""; filename="blob" Content-Type: text/plain
The file in question is a UTF-8 text file created using FileWriter. I can see it on disk and it contains the base64 string I wrote to it.