mirror of
https://github.com/apache/cordova-plugin-file-transfer.git
synced 2026-04-28 00:02:49 +08:00
CB-6212 iOS: fix warnings compiled under arm64 64-bit
This commit is contained in:
@@ -58,7 +58,7 @@ static CFIndex WriteDataToStream(NSData* data, CFWriteStreamRef stream)
|
||||
bytesToWrite - totalBytesWritten);
|
||||
if (result < 0) {
|
||||
CFStreamError error = CFWriteStreamGetError(stream);
|
||||
NSLog(@"WriteStreamError domain: %ld error: %ld", error.domain, error.error);
|
||||
NSLog(@"WriteStreamError domain: %ld error: %ld", error.domain, (long)error.error);
|
||||
return result;
|
||||
} else if (result == 0) {
|
||||
return result;
|
||||
@@ -207,7 +207,7 @@ static CFIndex WriteDataToStream(NSData* data, CFWriteStreamRef stream)
|
||||
if (mimeType != nil) {
|
||||
[postBodyBeforeFile appendData:[[NSString stringWithFormat:@"Content-Type: %@\r\n", mimeType] dataUsingEncoding:NSUTF8StringEncoding]];
|
||||
}
|
||||
[postBodyBeforeFile appendData:[[NSString stringWithFormat:@"Content-Length: %d\r\n\r\n", [fileData length]] dataUsingEncoding:NSUTF8StringEncoding]];
|
||||
[postBodyBeforeFile appendData:[[NSString stringWithFormat:@"Content-Length: %ld\r\n\r\n", (long)[fileData length]] dataUsingEncoding:NSUTF8StringEncoding]];
|
||||
|
||||
DLog(@"fileData length: %d", [fileData length]);
|
||||
NSData* postBodyAfterFile = [[NSString stringWithFormat:@"\r\n--%@--\r\n", kFormBoundary] dataUsingEncoding:NSUTF8StringEncoding];
|
||||
|
||||
Reference in New Issue
Block a user