We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, I get a *fileData = nil on line 93 of RCTFileTransfer.m: NSData *fileData = [NSData dataWithContentsOfURL: dataUrl];
*fileData = nil
NSData *fileData = [NSData dataWithContentsOfURL: dataUrl];
the object I am trying to send is:
let obj = { uri: "file://var/mobile/Containers/Data/Application/69982F3B-0575-41E1-91CA-DEC18B7F901D/Documents/videos/capturedvideo.MOV", uploadUrl: this.serverUrl + '/REST/medias/videos', fileName: 'test', fileKey: 'file', mimeType: 'multipart/form-data', headers: { 'Accept': 'application/json', 'Auth:' authToken } }
I am new to iOS and Xcode, bare with me if that question is stupid, and my apologies in advance..
The text was updated successfully, but these errors were encountered:
Hi @andreacab,
I was able to upload a video by changing lines 55-57 to:
/* CGImageRef fullScreenImageRef = [rep fullScreenImage]; UIImage *image = [UIImage imageWithCGImage:fullScreenImageRef]; NSData *fileData = UIImagePNGRepresentation(image); */ Byte *buffer = (Byte*)malloc((NSUInteger)rep.size); NSUInteger buffered = [rep getBytes:buffer fromOffset:0.0 length:(NSUInteger)rep.size error:nil]; NSData *fileData = [NSData dataWithBytesNoCopy:buffer length:buffered freeWhenDone:YES]; [self sendData:fileData withOptions:input callback:callback];
Hopefully this helps.
Sorry, something went wrong.
No branches or pull requests
Hi,
I get a
*fileData = nil
on line 93 of RCTFileTransfer.m:NSData *fileData = [NSData dataWithContentsOfURL: dataUrl];
the object I am trying to send is:
I am new to iOS and Xcode, bare with me if that question is stupid, and my apologies in advance..
The text was updated successfully, but these errors were encountered: