File upload - receive side only

P

Pavils Jurjans

Hello,

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?

Rgds,

Pavils
 
J

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.
 
G

Guest

Pavils,
Maybe I was kinda hard on my last response but webservice it across to
asp.net 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
DWS
 
D

dean

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,
--Dean

References:

[1]http://www.brettle.com/neatupload
[2]http://www.brettle.com/NeatUpload-1.2/docs/Manual.html#mozTocId483750
[3]http://www.brettle.com/NeatUpload-1.2/docs/Manual.html#mozTocId759939
[4]http://www.brettle.com/NeatUpload-1.2/docs/Manual.html#mozTocId628349
 

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

Members online

Forum statistics

Threads
473,968
Messages
2,570,153
Members
46,699
Latest member
AnneRosen

Latest Threads

Top