lloydsargent / BlackRaccoon

IOS FTP Client Code
102 stars 37 forks source link

Send multiple image files to FTP #23

Closed dav3harry closed 11 years ago

dav3harry commented 11 years ago

Hi, is there any method to send multiple image files to a FTP Server?

Thanks..

lloydsargent commented 11 years ago

There are multiple ways of sending multiple images via ftp.

1) The easiest (as in easy to debug) is to create a new upload request upon completion of each upload. Basically it goes like this:

a) get your list of files. Create an upload request. b) upon completion of the upload, create a NEW request to upload the next file.

2) Create multiple requests and start them all at the same time. The callbacks all have the object BRRequest which allows you to keep track of which file is which. The current version of BR now allows you to add custom variables via a Category (yes, it is a trick).

You MIGHT be able to use GCD but that is something that you will have to support: it is complex enough on the main thread (and with iOS 7 there may be changes).

I hope that answers your question!