Pārlūkot izejas kodu

Fix ios implementation base64 stream reader bug

Ben Hsieh 8 gadus atpakaļ
vecāks
revīzija
61282a6646
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1
    1
      src/ios/RNFetchBlob/RNFetchBlob.m

+ 1
- 1
src/ios/RNFetchBlob/RNFetchBlob.m Parādīt failu

@@ -143,7 +143,7 @@ NSMutableDictionary *fileStreams = nil;
143 143
 - (void)writeEncodeChunk:(NSString *) chunk {
144 144
     NSMutableData * decodedData = [NSData alloc];
145 145
     if([[self.encoding lowercaseString] isEqualToString:@"base64"]) {
146
-        decodedData = [chunk dataUsingEncoding:NSUTF8StringEncoding];
146
+        decodedData = [[NSData alloc] initWithBase64EncodedData:chunk options:0];
147 147
     }
148 148
     if([[self.encoding lowercaseString] isEqualToString:@"utf8"]) {
149 149
         decodedData = [chunk dataUsingEncoding:NSUTF8StringEncoding];