Good day to everyone..
I’m devoloping an Asp.Net Web Application in which I have to implement file upload, but with a little complication:
To better explain, the application is running on server “A”.. the files need to be uploaded to a completely distinct server “B”..
Once the client “C” uploads a file through the site interface, the file must actually be uploaded to server B.
Technically I already achieved this:
- client choses the file he wants to upload from his pc, then click “upload”
- during the postBack of the page”, the server upoloads the file without saving it
- I pick up the fileStream from the FileUploas control and send it via ftp to server “B”;
BUT, by doing this, actually the file is transferred twice (C -> A -> B), making the user experience of the file upload longer than normal..
My question is: is it possible to open a “direct” connection between “C” and “B” through the site interface (running on server “A”), in order to perform a single transfer? Obviously, I should be able to do the same thing during download..
An alternative (at least during upload) should be that of “hiding” the double transfer by saving a temp file on server “A”, and then re-transfer it to “B” starting a separated task, so that the user will be able to perform new actions on the site after the “first” upload.
Any suggestion is greatly appreciated (even quite different solutions, I’ll then evaluate the “compatibility” with my project)
Thank you in advance,
Alberto
Note: I choose to go for FTP because the client must be able to select where he want the “B” server to be placed (he can use “our” ftp or, if he has one, send files there) and I think that FTP is the most “compatible” and “fast set up” solution, being ftp managed similarly independently to the server “B” platform.
It’s not clear, what kind of connection you expect from C to be capable of making. If C can open direct connection to B, and if the server A has credentials for accessing B, the scenario can look as follows:
The above requires that you know details of FTP protocol and most likely implement it yourself as both client and server. And this can be quite time-consuming.