c# - Uploading a file through ASP MVC asyncronously? -
is possible upload file asynchronously website using asp mvc 4?
in current solution, when user uploads file, post-back checks number of bytes in file stream - if it's greater 8024 bytes, put error in tempdata , return same page indicating file large. if under 8024, create new task
funnel bytes filestream new destination file, somewhere on server.
however, boss correctly pointed out @ point may late warn user file large.
we wondering whether possible check length of file on server side before reading bytes user (and without user having wait file upload before finding out file large - imagine trying upload 8125kb file on 3mbit connection find out file gave 1 byte large, sorry, try again.
the reason asked if upload file asynchronously because seems asynchronous streaming me - give response, regardless of actual progress of upload.
we're aware can use iis (through httphandler attribute in configuration) prevent requests on x bytes, want handle error handling ourselves.
Comments
Post a Comment