Emiliano Angelini created CB-1750:
-------------------------------------
Summary: fileTransfer.upload not working - WP7
Key: CB-1750
URL: https://issues.apache.org/jira/browse/CB-1750
Project: Apache Cordova
Issue Type: Bug
Components: WP7
Affects Versions: 2.2.0
Environment: Using Windows 7, VisualStudio 2010 express for windows
Phone.
Testing on a device (Nokia Lumia 900 and emulator)
Reporter: Emiliano Angelini
Assignee: Jesse MacFadyen
Hi,
I've tryed to upload a File in an App that I'm developing and also tested the
CordovaExample that comes inside incubator-cordova-wp7, and everytime I called
FileTransfer.upload I got an error like this one:
options =
["{\"filePath\":\"test.txt\",\"server\":\"http://posttestserver.com/post.php?dir=cordovaTest\",\"fileKey\":\"file\",\"fileName\":\"newFile.txt\",\"mimeType\":\"text/plain\",\"params\":\"key1=value1&key2=value2\"}"]
A first chance exception of type 'System.InvalidCastException' occurred in
System.ServiceModel.Web.dll
A first chance exception of type 'System.InvalidCastException' occurred in
System.ServiceModel.Web.dll
InvalidCastException
Failed to deserialize
WP7CordovaClassLib.Cordova.Commands.FileTransfer+UploadOptions[] with JSON
value ::
["{\"filePath\":\"test.txt\",\"server\":\"http://posttestserver.com/post.php?dir=cordovaTest\",\"fileKey\":\"file\",\"fileName\":\"newFile.txt\",\"mimeType\":\"text/plain\",\"params\":\"key1=value1&key2=value2\"}"]
A first chance exception of type 'System.NullReferenceException' occurred in
WP7CordovaClassLib.dll
GapBrowser_Navigated :: /app/www/file.html#
I also tryed modifying cordova-2.2.0.js to send the options parameter as an
object instead of an Array (that solved the JSON deserialization) but ended up
with an Invalid left hand side assignment error.
Thanks
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira