react-native-blob-util 0.18.1 → 0.18.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -379,21 +379,6 @@ class ReactNativeBlobUtilFS {
379
379
  static Map<String, Object> getLegacySystemfolders(ReactApplicationContext ctx) {
380
380
  Map<String, Object> res = new HashMap<>();
381
381
 
382
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
383
- res = ReactNativeBlobUtilFS.getSystemfolders(ctx);
384
-
385
- // Include legacy folders anyway, since on the new arch compatibility between the spec and the turbomodule is enforced
386
- res.put("LegacyDCIMDir", "");
387
- res.put("LegacyPictureDir", "");
388
- res.put("LegacyMusicDir", "");
389
- res.put("LegacyDownloadDir", "");
390
- res.put("LegacyMovieDir", "");
391
- res.put("LegacyRingtoneDir", "");
392
- res.put("LegacySDCardDir", "");
393
-
394
- return res;
395
- }
396
-
397
382
  res.put("LegacyDCIMDir", Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM).getAbsolutePath());
398
383
  res.put("LegacyPictureDir", Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES).getAbsolutePath());
399
384
  res.put("LegacyMusicDir", Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_MUSIC).getAbsolutePath());
@@ -11,6 +11,7 @@ import com.facebook.react.bridge.Promise;
11
11
  import com.facebook.react.bridge.ReactApplicationContext;
12
12
  import com.facebook.react.bridge.ReadableArray;
13
13
  import com.facebook.react.bridge.ReadableMap;
14
+ import com.facebook.react.bridge.ReactMethod;
14
15
 
15
16
  import java.util.HashMap;
16
17
  import java.util.Map;
@@ -5,7 +5,7 @@
5
5
  import {NativeEventEmitter} from 'react-native';
6
6
  import UUID from '../utils/uuid';
7
7
 
8
- import ReactNativeBlobUtil from "../codegenSpecs/NativeBlobUtils";
8
+ import ReactNativeBlobUtil from '../codegenSpecs/NativeBlobUtils';
9
9
 
10
10
  const emitter = new NativeEventEmitter(ReactNativeBlobUtil);
11
11
 
@@ -36,7 +36,6 @@ export default class ReactNativeBlobUtilReadStream {
36
36
  // register for file stream event
37
37
  let subscription = emitter.addListener('ReactNativeBlobUtilFilesystem', (e) => {
38
38
  if (typeof e === 'string') e = JSON.parse(e);
39
- console.log(e, this.streamId, e.streamId, e.streamId === this.streamId)
40
39
  if (e.streamId !== this.streamId) return; // wrong stream
41
40
  let {event, code, detail} = e;
42
41
  if (this._onData && event === 'data') {
package/fetch.js CHANGED
@@ -1,4 +1,4 @@
1
- import {ReactNativeBlobUtilConfig} from 'types';
1
+ import {ReactNativeBlobUtilConfig} from './types';
2
2
  import URIUtil from './utils/uri';
3
3
  import fs from './fs';
4
4
  import getUUID from './utils/uuid';
@@ -31,7 +31,7 @@ dispatch_queue_t fsQueue;
31
31
  @synthesize filePathPrefix;
32
32
  @synthesize documentController;
33
33
  @synthesize bridge;
34
- bool hasListeners;
34
+ static bool hasListeners = NO;
35
35
 
36
36
  - (NSArray<NSString*> *)supportedEvents {
37
37
  return @[@"ReactNativeBlobUtilState", @"ReactNativeBlobUtilServerPush", @"ReactNativeBlobUtilProgress", @"ReactNativeBlobUtilProgress-upload", @"ReactNativeBlobUtilExpire", @"ReactNativeBlobUtilMessage", @"ReactNativeBlobUtilFilesystem", @"log", @"warn", @"error", @"data", @"end", @"reportProgress", @"reportUploadProgress"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-blob-util",
3
- "version": "0.18.1",
3
+ "version": "0.18.3",
4
4
  "description": "A module provides upload, download, and files access API. Supports file stream read/write for process large files.",
5
5
  "main": "index",
6
6
  "scripts": {