I want to upload images to the server via ftp.
I found SimpleFTPSample in the documentation for Apple and downloaded it.
When running the application (I am using xcode 4.5.2, the target simulator of iphone 5.0) it works fine. I try to create a directory on my server through this application and succeed.
But when loading the image presented in the application, an “open stream error” will occur. I did not make any changes to the application. Just enter url, username and password. I think there is no problem with this, since the directory that I specified was created successfully.
When creating the directory, the URL "ftp://54.xyz/newfolder/" is created successfully.
But when loading the URL is "ftp://54.xyz/TestImage1.png"
file path - "/var/folders/pn/8p0jc4qn70v37j58c1kwf8l80000gn/T/TestImage1.png"
The url is obtained by adding the last line of the component with the ftp url I specified.
So what is the mistake?
In fn,
- (void)stream:(NSStream *)aStream handleEvent:(NSStreamEvent)eventCode { case NSStreamEventErrorOccurred: { [self stopSendWithStatus:@"Stream open error"]; } break;
an error message is opened and displayed.
I googled all day and no necessary results. This is very urgent, and I can’t even start generosity for it. Please, help
source share