Shy as Mike is, he forgot to mention that he sells a library, SocketTools, which would handle your HTTP file upload quite well and easy. Visit the link in his signature to find out more.
Knuth (not affiliated with Catalyst, just a happy user of said library)
Announcement
Collapse
No announcement yet.
How can I send/receive files via http?
Collapse
X
-
Thanks, Mike. That was a helpful (if somewhat depressing) explanation. Now I know why I had gotten files to download after experimenting but got nowhere trying to upload them after an afternoon of trial and error. I don't see any POST or PUT examples in that thread. If anyone knows of any I'm all ears.
Leave a comment:
-
For very simple download functionality, there's source code examples available that demonstrate how to do it using the built-in TCP statements. Uploading gets a bit more complicated because there's one of two methods that file uploads are done. One is using the PUT command, the other using POST. The PUT command is simplest, but it requires that the server enable file uploads this way, and most don't by default. The alternative is to use POST, in the same way that attachments are uploaded through this forum software, but it requires that you compose a multipart message with the form data that includes the contents of the uploaded file. So, generally speaking, downloading files using HTTP is trivial but uploading them requires some specific configuration on the server, and the vast majority of HTTP servers either don't accept file uploads at all, or only in a very limited context.
Leave a comment:
-
How can I send/receive files via http?
I know this is basic. But I've been using TCP for up/downloading files to an ftp server for awhile and now I want to switch to http. Can anyone refer me to some functions that demonstrate how to do this?Tags: None
Leave a comment: