1 Star 0 Fork 0

RN鸿蒙化项目团队/ty-react-native-blob-util

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
index.js 1.73 KB
一键复制 编辑 原始数据 按行查看 历史
// Copyright 2016 wkh237@github. All rights reserved.
// Use of this source code is governed by a MIT-style license that can be
// found in the LICENSE file.
import ReactNativeBlobUtil from './codegenSpecs/NativeBlobUtils';
//import StatefulPromise from './class/StatefulPromise.js'
import fs from './fs';
import MediaCollection from './mediacollection';
import base64 from 'base-64';
import polyfill from './polyfill';
import android from './android';
import ios from './ios';
import JSONStream from './json-stream';
import {config, fetch} from './fetch';
import URIUtil from './utils/uri';
import CanceledFetchError from './class/ReactNativeBlobUtilCanceledFetchError';
const {
ReactNativeBlobUtilSession,
readStream,
createFile,
unlink,
exists,
mkdir,
session,
writeStream,
readFile,
ls,
isDir,
mv,
cp
} = fs;
const Blob = polyfill.Blob;
const wrap = URIUtil.wrap;
// Show warning if native module not detected
if (!ReactNativeBlobUtil || !ReactNativeBlobUtil.fetchBlobForm || !ReactNativeBlobUtil.fetchBlob) {
console.warn(
'react-native-blob-util could not find valid native module.',
'please make sure you have linked native modules using `rnpm link`,',
'and restart RN packager or manually compile IOS/Android project.'
);
}
export {ReactNativeBlobUtilConfig, ReactNativeBlobUtilResponseInfo, ReactNativeBlobUtilStream} from './types';
export { URIUtil } from './utils/uri';
export {FetchBlobResponse} from './class/ReactNativeBlobUtilBlobResponse';
export { getUUID } from './utils/uuid';
export default {
fetch,
base64,
android,
ios,
config,
session,
fs,
wrap,
polyfill,
JSONStream,
MediaCollection,
CanceledFetchError
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/rn-mi/ty-react-native-blob-util.git
git@gitee.com:rn-mi/ty-react-native-blob-util.git
rn-mi
ty-react-native-blob-util
ty-react-native-blob-util
master

搜索帮助