Multifile uploading (with IdHTTP?)


2007-01-13 08:14:01 PM
delphi242
Hi,
i was asked to make an upload tool for a website. It must be something
like r4pid share upload tool (it uploads file(s) through HTTP on
server). What I managed to accomplish is GUI (listview with
progressbars etc.), now I am thinking about network communication and
design pattern.
I decided to use IdHTTP and threads obviously, but I cant imagine some
working model. Do i have to use threadpool ? Is it safe to access main
form from thread directly ? I'd like to have this well designed,
because it would be waste of time to redesign whole code every time :(
Second problem: I managed to upload a file through POST with
datastream. However, when I try to upload a big one and I close
application, upload is STILL in progress ! Can I clear somehow idhttp
buffers while mainform being closed ?
Thanks :)