Wrong file name when video uploaded to ASP.NET webservice

2 posts, 1 answers
  1. Idan
    Idan avatar
    76 posts
    Member since:
    Oct 2012

    Posted 15 Oct 2013 Link to this post

    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.
  2. Answer
    Idan
    Idan avatar
    76 posts
    Member since:
    Oct 2012

    Posted 15 Oct 2013 Link to this post

    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
Back to Top