RCTBlobManager.h 789 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * Copyright (c) Facebook, Inc. and its affiliates.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. */
  7. #import <React/RCTBridge.h>
  8. #import <React/RCTBridgeModule.h>
  9. #import <React/RCTURLRequestHandler.h>
  10. @interface RCTBlobManager : NSObject <RCTBridgeModule, RCTURLRequestHandler>
  11. - (NSString *)store:(NSData *)data;
  12. - (void)store:(NSData *)data withId:(NSString *)blobId;
  13. - (NSData *)resolve:(NSDictionary<NSString *, id> *)blob;
  14. - (NSData *)resolve:(NSString *)blobId offset:(NSInteger)offset size:(NSInteger)size;
  15. - (NSData *)resolveURL:(NSURL *)url;
  16. - (void)remove:(NSString *)blobId;
  17. - (void)createFromParts:(NSArray<NSDictionary<NSString *, id> *> *)parts withId:(NSString *)blobId;
  18. @end