问题标签 [react-native-image-picker]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
javascript - NativeFirebaseError:[存储/未授权]用户无权执行所需的操作
我在将图像上传到 Firebase 存储时遇到问题。我正在使用 React Native 的 @react-native-firebase/storage 并且安装和连接似乎很好,因为我能够很好地引用图像:
问题肯定是基于权限的,因为当我暂时删除时:
来自 Firebase 控制台存储规则:
这工作得很好:
那么如何进行身份验证以安全地使用 putFile 呢?
编辑:我正在使用“@react-native-firebase/storage”:“^6.2.0”
提前致谢!
react-native - 如何在 React Native 中将图像作为导航参数传递
我正在使用 Image Picker 来获取用户照片,然后我需要在下一个屏幕中显示它。我怎样才能做到这一点?
图像选择器功能:
我需要使用此按钮将图像传递到下一个屏幕:
这就是我尝试的方式,但我无法让它工作,我只设法通过导航参数传递正常值,如字符串。
javascript - React Native Expo 如何使用 expo 图像选择器将图像上传到 Firebase
我正在尝试将图像上传到我的火力基地,但我无法弄清楚。
这是我的代码
我收到这个错误。
react-native - 如何从 /storage/emulated/0/Pictures 中删除 react-native-image-crop-picker 图像
捕获图像时,它会保存两张图像,一张是原始图像,另一张是压缩图像,并给出压缩图像的路径image.path
。如何禁用在图库中保存任何图像,我只需要使用 base64 即可?
输出如下:
android - 如何在 React-native 中将图像从图库复制到应用程序的安装目录
我想从图库中选择一张图片,然后使用 react-native 将该图片复制到当前正在运行的应用程序的安装目录中。
android - react-native-firebase:compileDebugRenderscript FAILED: Could not resolve android.arch.lifecycle:runtime:1.1.0
Please note that posting on StackOverflow is my last choice, and I have already spent hours searching over GitHub issues and related questions.
The problem occurred as soon as I added implementation project(':react-native-image-picker')
and implementation "com.google.firebase:firebase-storage:16.0.5"
into android/app/build.gradle
.
- package.json
- android/build.gradle
- android/app/build.gradle
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
Error occurred - Build Failed
react-native - 使用 React Native 将图像上传到 Firebase
我正在尝试将照片上传器制作到 firebase 以响应本机。我遵循了一个教程并采用了一对一的代码。但是,在我想执行代码之后,一切似乎都可以正常工作,直到必须上传代码,然后我收到以下错误:
可能的未处理承诺拒绝(id:0):错误:发生了未知错误。fn@ http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:2132:45 http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:127402:44 putFile@ http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:137147:104 uploadImage@ http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:210966:91 touchableHandlePress @ http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:54240:47 touchableHandlePress @[native code] _performSideEffectsForTransition@ http://localhost:8081/index.bundle?platform=android&dev=true& _performSideEffectsForTransition@[native code] _receiveSignal@ http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:52798:46 _receiveSignal@[native code] touchableHandleResponderRelease@ http://localhost:8081/index.bundle ?platform=android&dev=true&minify=false:52677:26 touchableHandleResponderRelease @[native code] invokeGuardedCallbackImpl@ http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:8997:21 invokeGuardedCallback@ http://localhost :8081/index.bundle?platform=android&dev=true&minify=false:9093:42 invokeGuardedCallbackAndCatchFirstError@ http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:9097:36 执行调度@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:9204:48 executeDispatchesInOrder@ http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:9224:26 executeDispatchesAndRelease@ http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:9329:35 forEach@[native code] forEachAccumulated@ http://localhost:8081/index.bundle?platform=android&dev=true&minify=false :9319:22 runEventsInBatch@ http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:9353:27 runExtractedPluginEventsInBatch@ http://localhost:8081/index.bundle?platform=android&dev=true&minify=false :9441:25 http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:10467:42 batchedUpdates$1@ http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:21921:20 batchedUpdates @ http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:10415:36 _receiveRootNodeIDEvent@ http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:10466:23 receiveTouches @ http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:10496:34 __callFunction@ http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:2650:49 http ://localhost:8081/index.bundle?platform=android&dev=true&minify=false:2363:31 __卫士@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:2604:15 callFunctionReturnFlushedQueue@ http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:2362:21 callFunctionReturnFlushedQueue@ [本机代码]
有人熟悉将图像上传到firebase吗?在本教程中,他们使用 uuid,但由于某种原因,当我尝试使用它时应用程序会中断,所以我将其省略了。这是相应的代码:
我对本机反应还很陌生,想上传图片,有没有人可以帮助我完成这项工作?即使有其他方法,我也愿意接受!
react-native - React Native 图像选择器在成功上传后显示图像太慢
成功上传图片后,上传的图片需要时间显示吗?有人知道吗?
这是我的代码
这是我的完整代码
android - multer,反应原生图像选择器图像上传在 iOS 上不起作用
我在通过 fetch 和 react-native-image-picker 将图像上传到 multer 和 express js 后端时遇到了很大的麻烦。
下面是我的反应原生代码。
image
变量是我们从 react-native-image-picker 库中获得的响应对象,其中包含图像数据和 uri 以及其他需要的项目。
在后端,我试图登录由 multer 配置的 req.files 对象。
在控制器中,我将只是console.log(req.files)
然后返回成功消息。
我可以在 android 模拟器上看到控制台日志,但在 iOS 模拟器上看不到。
事实上,看起来图像并没有被发送到后端。但是后端没有错误,并且在 iOS 的情况下没有记录。
真是令人沮丧
有人可以帮忙吗?