Contact us


All times are UTC - 8 hours



   [ 6 posts ] 
Author Message
   


Joined: Fri May 23, 2014 4:02 am
Posts: 12
Location: Lancaster, UK
Hi,

I recently updated our code to remove a workaround we had in place which encoded scans as base64 (this workaround was mentioned in another post somewhere and allows you to not use the WebTWAIN HTTP posts). It wasn't a particular nice workaround and limited file upload sizes due to the increased size of the encoded request.

Our code now uses HTTPUploadAllThroughPostAsPDF and works perfectly on Chrome and Firefox (except I can't set the content type correctly for PDFs, but that's a small matter). Unfortunately in IE (I've only tested IE11 so far) we receive an exception from our Web API layer:

Error parsing MIME multipart body part header byte 94 of data segment System.Byte[].

I eventually - after much messing around with Fiddler - managed to track this down to the way that the request is constructed in IE (I notice the user agent is "Dynamsoft" whereas Chrome seems to report the usual value).

The IE request includes additional parts with the following names: DynamicFileUUID, DynamicFileTotalSize, DynamicFileOffset, DynamicFileCurrentSize. I don't need them but I can ignore them. Unfortunately it suffixes each part with a semi-colon, as shown here:


-----------------------------7d22c1f30aa4
Content-Disposition: form-data; name="fileInfo";

{"TypeCode":"014241","Filename":"test"}
-----------------------------7d22c1f30aa4
Content-Disposition: form-data; name="DynamicFileUUID";

2cd0229b-61d7-413c-ae4a-2625b27e8258
-----------------------------7d22c1f30aa4
Content-Disposition: form-data; name="DynamicFileTotalSize";

436936
-----------------------------7d22c1f30aa4
Content-Disposition: form-data; name="DynamicFileOffset";

0
-----------------------------7d22c1f30aa4
Content-Disposition: form-data; name="DynamicFileCurrentSize";

436936

ASP.NET Web API appears to be unable to deal with the semi-colon. I notice that the semi-colon is not provided for the actual file data part and is not provided at all for any part via other browsers (Chrome and Firefox).

Is it possible to do anything about this?

Thanks in advance,

Nat


User avatar
   


Joined: Tue Mar 08, 2005 12:23 am
Posts: 1706
Hi Nat,

This issue will be resolved in the coming release of Dynamic Web TWAIN v11 at the end of July. Could you please send an email to sales@dynamsoft.com so we can inform you about the upgrade?

Thanks,

_________________
Vincy
Dynamsoft Support Team
Follow us@Twitter, Facebook


   


Joined: Fri May 23, 2014 4:02 am
Posts: 12
Location: Lancaster, UK
Hi Vincy,

Thanks for your reply - will do.

Regards

Nat


   


Joined: Fri May 23, 2014 4:02 am
Posts: 12
Location: Lancaster, UK
Hi Vincy,

Can I make one other feature suggestion if work is being done on the HTTP upload stuff? Specify server host, page and port, etc. separately feels like quite an archaic way of doing things.

Can we not just specify an endpoint, e.g. I might have:

POST: http://myserver.host.com:12345/api/stud ... /documents to upload a document. It'd be nice not to have to break this up into separate components.

Via Chrome and Firefox it seems happy enough for me to just specify that URI (including port number) as the value of hTTPServer, and leave actionPage empty. IE seems to need the separation for some reason - possibly because it does some encoding of the value?


   


Joined: Fri May 23, 2014 4:02 am
Posts: 12
Location: Lancaster, UK
One other IE-specific thing I notice is that I also needed to specify the IfSSL and HTTPPort options. It's much nicer in Chrome / Firefox where you can just specify a standard endpoint and it'll work it all out for itself!


User avatar
   


Joined: Tue Mar 08, 2005 12:23 am
Posts: 1706
Hi Nat,

Thanks a lot for the suggestion. That seems make more sense than the current mechanism of Dynamic Web TWAIN upload.

I will submit a ticket to our R&D team to suggest them to improve the upload mechanism in the future release.

Thanks again!

_________________
Vincy
Dynamsoft Support Team
Follow us@Twitter, Facebook


Display posts from previous:  Sort by  
   [ 6 posts ] 


Who is online

Users browsing this forum: WillieCam and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
Copyright © 2018 Dynamsoft | All Rights Reserved
dynamic designed by Dynamsoft team
Fatal: Not able to open ./cache/data_global.php