This repository was archived by the owner on Mar 16, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ import EventTarget from './EventTarget'
1111const log = new Log ( 'Blob' )
1212const blobCacheDir = fs . dirs . DocumentDir + '/RNFetchBlob-blobs/'
1313
14- log . disable ( )
15- // log.level(3)
14+ // log.disable()
15+ log . level ( 3 )
1616
1717/**
1818 * A RNFetchBlob style Blob polyfill class, this is a Blob which compatible to
@@ -113,7 +113,7 @@ export default class Blob extends EventTarget {
113113 formArray . push ( '\r\n--' + boundary + '\r\n' )
114114 let part = parts [ i ]
115115 for ( let j in part . headers ) {
116- formArray . push ( j + ': ' + part . headers [ j ] + '; \r\n' )
116+ formArray . push ( j + ': ' + part . headers [ j ] + '\r\n' )
117117 }
118118 formArray . push ( '\r\n' )
119119 if ( part . isRNFetchBlobPolyfill )
@@ -342,5 +342,6 @@ function createMixedBlobData(ref, dataArray) {
342342 return fs . appendFile ( ...arg )
343343 } . bind ( args [ i ] ) )
344344 }
345+ console . log ( '###ref' , ref )
345346 return p . then ( ( ) => Promise . resolve ( size ) )
346347}
Original file line number Diff line number Diff line change @@ -6,8 +6,8 @@ import Blob from './Blob'
66
77const log = new Log ( 'FetchPolyfill' )
88
9- log . disable ( )
10- // log.level(3)
9+ // log.disable()
10+ log . level ( 3 )
1111
1212export default class Fetch {
1313
@@ -32,7 +32,6 @@ class RNFetchBlobFetchPolyfill {
3232 options . headers [ 'Content-Type' ] = ctype || ctypeH
3333 options . headers [ 'content-type' ] = ctype || ctypeH
3434 options . method = options . method || 'GET'
35-
3635 if ( body ) {
3736 // When the request body is an instance of FormData, create a Blob cache
3837 // to upload the body.
@@ -55,7 +54,6 @@ class RNFetchBlobFetchPolyfill {
5554 else
5655 promise = Promise . resolve ( body )
5756 }
58-
5957 // task is a progress reportable and cancellable Promise, however,
6058 // task.then is not, so we have to extend task.then with progress and
6159 // cancel function
@@ -69,7 +67,7 @@ class RNFetchBlobFetchPolyfill {
6967 log . verbose ( 'response' , resp )
7068 // release blob cache created when sending request
7169 if ( blobCache !== null && blobCache instanceof Blob )
72- blobCache . close ( )
70+ // blobCache.close()
7371 return Promise . resolve ( new RNFetchBlobFetchRepsonse ( resp ) )
7472 } )
7573
You can’t perform that action at this time.
0 commit comments