is there a way to upload a file to a WE server without using the WebfileUpload Control?
Basically what I want to do is at the client side use CURL (HTTP upload using PUT method) in a desktop application to upload files to a server.
I am not sure how to handle the upload at the server side (how to receive and save the file)
Files to be uploaded are binary data, about 300MB size.
Or is WE not the best choice for this?
I have found a couple of solutions in the forums that use httpsocket to implement a simple webserver - but they allow only to download files, no uploads…
I believe the Taylor Design Web Custom Controls have an alternative uploader, but I’m not familiar with it.
Perhaps you can also use WebApplication.HandleSpecialURL to have your web app receive files from a desktop app using an HTTP PUT.
I’d suggest against this for the time being. The original request mechanism is rather inefficient and uploading any data ends up being copied in memory two or three times (depending on where its going). With your 300MB file size, the web app’s memory footprint would slowly grow by 300MB, and then that data would be copied in memory, thus your app could die with an OutOfMemoryException. We’re aware of, and hope to have a solution soon.
Heinz, If your server has Apache available, write an upload receiver script in PHP and save the file to a directory that WE can get at. Use a server side Timer to periodically check that directory for new files, and process them accordingly. With a large file like that, you’ll want that processing to happen in a Thread rather than a Session’s Thread so that processing doesn’t block the Session. If these files are tied to specific Sessions, then maybe use subdirectories of that known place named with Session.identifier.