- This topic has 12 replies, 5 voices, and was last updated 10 years, 7 months ago by bremy.
-
AuthorPosts
-
shahinMemberIs there any example or program as how to upload a file in my Mobione application to my server. I would like to have a webservice written c# which accepts uploaded files from mobione.
BrandonMemberYou can use PhoneGap/Cordova API for file transfers
http://docs.phonegap.com/en/2.9.0/cordova_file_file.md.html#FileTransfer
shahinMemberThank you for your answer. I am reading the example. The other question I have is how can I display a dialog box to search my mobile device for a file. Like File open dialog.
-Thanks
shahinMemberThank you for your answer. I am reading the example. The other question I have is how can I display a dialog box to search my mobile device for a file. Like File open dialog.
-Thanks
BrandonMemberIt depends on the file, if its a image file from the camera roll you can use this:
http://docs.phonegap.com/en/2.9.0/cordova_camera_camera.md.html#camera.getPictureI dont think most devices support just a file browsing dialog, but not 100 percent sure.
shahinMemberThanks Brandon, now I have coded the sample and when I use simulation in the end it comes up with a very unexpected dialog as attached. Any idea what it is?
Attachments:
You must be logged in to view attached files.
support-octavioMemberHi shahin,
That looks like a bug in the simulator, we have seen it in the past when an exception is not handled properly. Please share a small sample project that demonstrate the issue so we can investigate it.
shahinMemberHere it it…please try the attached demo
Attachments:
You must be logged in to view attached files.
BrandonMemberI was under the impression that the PhoneGap/Cordova File API did to work in the simulator, hence the error.
shahinMemberAm I doing anything wrong? How can I fix it?
bremyMemberHello. I also need to “upload” a text file toward my server and I am having the say guy talking about “chessburger”
I am pretty sure my server is able to receive a text file send as a stream from a client app. Working like a charm from a C# test client application
But Impossible from the emulator to have the Cordova “upload” function working
Any one from you that has success using it or could gives tips to make this working?
waiting to ear from youMany thanks
support-michaelKeymasterLooks like file xfer API is not implemented. I have opened a bug on the the simulator.
bremyMemberThanks a lot Wayne
I have good news because running a real machine, the upload is working like a charm
That will be definitely great to have it working in the emulator as welltake care
-
AuthorPosts