This is a migrated thread and some comments may be shown as answers.

Wrong file name when video uploaded to ASP.NET webservice

1 Answer 27 Views
General Discussion
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Idan
Top achievements
Rank 1
Idan asked on 15 Oct 2013, 12:35 PM
I am trying to upload a video to a webservice. Everything seems to go well but I always get the filename "image.jpg" on the server when checking the HttpContext.Current.Request.Files[0] in C# / Webservice.

When I checked the path in:

transfer.upload(path, IMAGE_WEB_SERVICE +  "SaveVideo", success, fail, options);

I see: "file:///mnt/sdcard/DCIM/Carmear/VID_20131015_153223.3gp" --- which is the correct path and file extension. 
So why when the file is being transferred to the webservice I get it as "image.jpg"?

Thanks in advance.

1 Answer, 1 is accepted

Sort by
0
Accepted
Idan
Top achievements
Rank 1
answered on 15 Oct 2013, 12:51 PM
Found the answer:

"If not set defaults to "image.jpg". (DOMString)".

http://docs.phonegap.com/en/1.5.0/phonegap_file_file.md.html#FileUploadOptions
Tags
General Discussion
Asked by
Idan
Top achievements
Rank 1
Answers by
Idan
Top achievements
Rank 1
Share this question
or