我正在尝试将图像文件上传到服务器。我正在应用来自https://github.com/valentinradu/WhiteRaccoon的示例
这是代码:
UIImage *image = [UIImage imageNamed:@"hotel1.jpg"];
NSData *imageData = UIImageJPEGRepresentation(image, 0);
WRRequestUpload * uploadImage = [[WRRequestUpload alloc] init];
uploadImage.delegate = (id)self;
//for anonymous login just leave the username and password nil
uploadImage.hostname = @"***.***.***.***";
uploadImage.username = @"-------";
uploadImage.password = @"-------";
//we set our data
uploadImage.sentData = imageData;
//the path needs to be absolute to the FTP root folder.
//full URL would be ftp://xxx.xxx.xxx.xxx/space.jpg
uploadImage.path = @"/android_images/image.jpg";
//we start the request
[uploadImage start];
但它给出了错误 -[WRRequestListDirectory stream:handleEvent:] [Line 1004] Unknown error!
我错过了什么吗?请帮帮我。