ASP FTP: Is it the best answer?

david7777

Active member
Joined
Feb 17, 2005
Messages
33
I have developed a program which compresses JPG files, and creates an XML file to link images to keywords etc. Once the user has entered all info, they can save to disk, or upload to the internet.

To upload to the internet, I have used FTP. I have used the "edtftpnet" version 1.1.4 assembly for this. To upload, I have decided to upload each individual file seperately, as uploading one large file may cause problems. Each image can be between 60kb and 250kb. Any number of images can be uploaded, but normally no more than 100 at a time.

First of all - is this the best approach?

Secondly, I am getting problems with the FTP - I am loosing connection while uploading. If this happens, not all the files are uploaded, and i need to manually upload them without my program. How can i prevent this, or make sure that all images are uploaded? (Assuming no hardware problems or no physical connection to the internet is lost)

Thirdly - this program is going to be used by a few people (maximum 10), so i would like to know of potential security issues of using standard FTP.
 
Ive been doing a similar admin application and have used this approach too. I have only figured out one another usable way to upload the files: through webservice. However, that would result to mime-encoding the file, thus increasing the number of bytes up to twice and, possibly, another problems with big files that could be blocked at upload. So using FTP to upload images is OK, I think.
Im not quite sure about how it is about the security with FTP as I dont know if it is possible to use it along with SSL or some other secure protocol (maybe passive ftp is accomplishing this enough?). However, at my position, I dont need to secure the images Im uploading. Other data, such as sql commands, xml files and so, that could be vulnerable and need to be uploaded securely, should be upladed using webservice through SSL.
And a word about connection loosing:
thats it, you just cant rely on a ftp connection persistance. The FTP connection may be broken anytime (though it should be rather rare unless there is some problem) and you may choose if you reconnect and continue or let the user decide.
Everything has to be done in a transaction.
You may try to repeat uploading files that have not been uploaded completely or discard them all if the transaction has not completed, but in every case you must save the information about which files have been uploaded and which have not.
 
Back
Top