File upload - receive side only


Pavils Jurjans


I have the following setup:

The page that contains the form with file upolad HTML control resides on
another server that doesn't have ASP.NET available. It may well be just
static HTML.

I need to program the "receiving side" of the upload. Preferrably, I'd be
happy with soultion that doesn't involve webforms controls, not to make
things complex. I want to avoid the webforms control also because I want to
have better understanding how the uploaded file is handled in the
server-side, and in what format it is available for developer. Please
understand me right - I've been programming pure JScript (classic ASP) file
upload solution, that not just properly handles the incoming POST request
with muliple files, but also is able to update upload progress in the
database so that the user doing the upload has some feeling of progress of
the transfer. So, I know the guts of what happens when file upload happens.
I am wondering do I have to recode the ASP.NET file upload server-side code
to achieve the same goals - being able to update upload progress in the
database (so that another script can display the progress), and having pure
byte stream in hands for further handling? Maybe I can intercept the POST
request handling in some lower level, before the control gets to the Render
method of the child of System.Web.UI.Page?



John Timney \( MVP \)

take a look at some of the ihttpmodule upload examples (google it), it will
give you an idea of how an upload works when it reaches serverside.


Maybe I was kinda hard on my last response but webservice it across to server. You can look at the ihttphandler all you want to but thats
advanced coding and you didn't even want to use a form.

Good Luck


My NeatUpload 1.2 component [1] has support for doing *most* of what
you want. It's probably easiest to use its controls but it's
possible to upload without them. If you are just trying to avoid
putting ASP.NET on a static HTML page, the simplest solution is
probably to put an iframe in your static HTML page and display an
ASP.NET page within the iframe.

If you really want to avoid using web forms controls entirely, with
NeatUpload you'll need to add a special query param to your form's
action URL [2] and you'll need to write a custom UploadStorageProvider
[3] that can tell NeatUpload where to put each uploaded file.

The one thing that NeatUpload doesn't currently support is storing the
progress info in a DB. It is currently held in application state and
is only available via a web page. However the format of that web page
can be customized [4] so that you could, for example, return an XML
document that your app parsed to get the progress info.

Also, since NeatUpload is open source you can modify it to suit your
needs or examine the source code to get a better understanding of how
it works.

Hope that helps,



Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

File Upload 3
File Upload control 5
File Upload Folder Permissions 5
File Upload in Business Layer 2
ASP.NET 2.0 file upload with progress dialog 2
Upload XLSX file 7
Upload and server FTP 2
File upload control 5