我想将我的应用生成的图像上传到 Dropbox。我从 DBRESTClient 看到了上传方法,但在我看来,我必须在调用上传方法之前将图像写入临时文件。
有没有办法从内存中的对象上传文件?像这样的东西:
UIimage *myImage = [[UIImage alloc]....
//
// Here I create the image on my app
//
NSData *myData = UIImageJPEGRepresentation(myImage, 1.0);
DBRestClient *rc = [[DBRestClient alloc] initWithSession:[DBSession sharedSession]];
self.restClient = rc;
[rc release];
self.restClient.delegate = self;
[self.restClient uploadFile:@"myImage.jpg" toPath:@"DropBoxPath" fromPath:myData];