I would like to be able to upload a file using my FTP code and then be able to upload the file with a randomly generated name (preferable 7 characters long with just upper and lower case letters)
Here is my ftp method:
ftpManager = [[FTPManager alloc] init];
success = NO;
NSArray* serverData = nil;
FMServer* srv = [FMServer serverWithDestination:[@"IP" stringByAppendingPathComponent:@"/"] username:@"username" password:@"password"];
srv.port = self.portField.intValue;
switch (action) {
case upload:
success = [ftpManager uploadFile:fileURL toServer:srv];
break;
default;
break;
How can I edit the file name that is uploaded to the ftp server?
EDIT: Added location of 'fileURL' code:
fileURL = [NSURL URLWithString:@"/tmp/tmpscr.png"];
action = upload;
[self runAction];