|
Hello, while I managed to upload file, I a problem with GetReadSteram on the OData client for Objective-C.
As in the documentation, to get a file I perform the following actions:
DataServiceQuery *query = [proxy
pictures];
[query filter:[NSString
stringWithFormat:@"LinkedBoxID eq %@",selectedItem]];
QueryOperationResponse *queryOperationResponse = [query
execute];
Model_Picture *thePicture =[[queryOperationResponse
getResult] objectAtIndex:0];
[thePicture retain];
NSLog(@"pictureID ID: %@", [thePicture
getID]);
DataServiceStreamResponse *streamresponse = [proxy
getReadStream:thePicture];
From this line, no matter what happens, I get a "unsupported URL" error.
However, if I point my browser to the URL , which is http://192.168.138.2/Services/OData.svc/Pictures(1)/$value , can see the picture displayed in my browser!
I'd also like to inform the developers that if I follow the sample step-by-step and write "NSData *stream =[response getStream];", Xcode shows a warning since [response getStream ] returns a NSString and not a NSData.
Any help is appreciated, thank you
Giovanni
|