In my scenario, users are able to upload zip files to a.example.com
I would love to create a "daemon" which in specified time intervals will move-transfer any zip files uploaded by the users from a.example.com
to b.example.com
From the info i gathered so far,
- The daemon will be an .ashx generic handler.
- The daemon will be triggered at the specified time intervals via a plesk cron job
- The daemon (thanks to SLaks) will consist of two FtpWebRequest's (One for reading and one for writing).
So the question is how could i implement step 3?
- Do i have to read into to a memory() array the whole file and try to write that in
b.example.com
? - How could i write the info i read to
b.example.com
? - Could i perform reading and writing of the file at the same time?
No i am not asking for the full code, i just can figure out, how could i perform reading and writing on the fly, without user interaction.
I mean i could download the file locally from a.example.com
and upload it at b.example.com
but that is not the point.