问题标签 [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.
reactjs - 如何仅发送图像消息?(也没有发送文本)
我只是想发送图像而不输入任何文本?我正在使用 react-native-image-picker 并且我目前可以发送带有文本的图像,但是如果我只想发送图像怎么办?我尝试了 alwaysShowSend 并尝试发送,但除非文本字段不为空,否则什么也没有发生 文档对此非常模糊......
react-native - 使用 react-native-image-picker 有大小限制吗?
我想如果我需要使用react-native-image-picker上传的图像有任何大小限制。因为当我尝试上传大小为 33MB 的 jpg 图像时,应用程序崩溃并显示“appName 已停止工作”。但与此同时,我可以上传 1MB 以上的扩展图片 png、jpeg、jpg 等,它工作正常。
看,当我尝试上传那个大文件时,我没有得到任何回应。但这在 iOS 的情况下工作正常。
ios - react-native-image-picker crashing at run - Metro Bundler error
I want to use 'react-native-image-picker' in my application. After importing and following the install instructions from the github instructions. I get a metro bundler crash on run. It can't seem to locate the 'react-image-picker' or it's dependencies?
I have tried initializing a new project and ONLY installing image picker. I have tried running 'react-native link' and 'react-native link react-native-image-picker' in the root. I have tried initializing the project with expo. I've checked the directories that Metro claims are missing, and they look good to me.
error: bundling failed: Error: While trying to resolve module react-native-image-picker
from file /Users/owenmorris/Documents/GitHub/fecebook/App.js
, the package /Users/owenmorris/Documents/GitHub/fecebook/node_modules/react-native-image-picker/package.json
was successfully found. However, this package itself specifies a main
module field that could not be resolved (/Users/owenmorris/Documents/GitHub/fecebook/node_modules/react-native-image-picker/src/index.ts
. Indeed, none of these files exist:
/Users/owenmorris/Documents/GitHub/fecebook/node_modules/react-native-image-picker/src/index.ts(.native||.ios.js|.native.js|.js|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx)
/Users/owenmorris/Documents/GitHub/fecebook/node_modules/react-native-image-picker/src/index.ts/index(.native||.ios.js|.native.js|.js|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx)
at ResolutionRequest.resolveDependency (/Users/owenmorris/Documents/GitHub/fecebook/node_modules/metro/src/node-haste/DependencyGraph/ResolutionRequest.js:65:15) at DependencyGraph.resolveDependency (/Users/owenmorris/Documents/GitHub/fecebook/node_modules/metro/src/node-haste/DependencyGraph.js:283:16) at Object.resolve (/Users/owenmorris/Documents/GitHub/fecebook/node_modules/metro/src/lib/transformHelpers.js:264:42) at /Users/owenmorris/Documents/GitHub/fecebook/node_modules/metro/src/DeltaBundler/traverseDependencies.js:399:31 at Array.map () at resolveDependencies (/Users/owenmorris/Documents/GitHub/fecebook/node_modules/metro/src/DeltaBundler/traverseDependencies.js:396:18) at /Users/owenmorris/Documents/GitHub/fecebook/node_modules/metro/src/DeltaBundler/traverseDependencies.js:269:33 at Generator.next () at asyncGeneratorStep (/Users/owenmorris/Documents/GitHub/fecebook/node_modules/metro/src/DeltaBundler/traverseDependencies.js:87:24) at _next (/Users/owenmorris/Documents/GitHub/fecebook/node_modules/metro/src/DeltaBundler/traverseDependencies.js:107:9) BUNDLE [ios, dev] ./index.js ░░░░░░░░░░░░░░░░ 0.0% (0/1), failed.
react-native - Expo ImagePicker在取消时卡在ActivityIndicator上
我正在创建一个项目,我需要用户从他们的照片库中选择一个图像。但是我遇到了一个问题,当用户在他们的画廊中取消 ImagePicker 时,活动指示器将显示并且用户不再能够选择图像。我该怎么做才能在按下取消按钮时重新显示上传图片按钮?
这是我的代码:
编辑:这是功能
symfony - 使用 react-native-fetch-blob 上传后,Symfony 中的文件为空
我想从 react-native 上传一张图片到 PHP Symfony 服务器。我用 ImagePicker.showImagePicker 选择图片并用 RNFetchBlob.fetch 发送它,但在 Symfony 中该文件似乎是空的。$file->getMimeType() 返回“文件不存在或不可读”并且文件的内容类型是八位字节流。它应该是图像/JPEG。
任何想法 ?感谢帮助 :)
PHP代码:
反应本机代码:
iphone - React 本机图像选择器未从 iOS 13 或更高版本的库中选择视频
React 本机图像选择器版本为 0.28.0,React 本机 0.59.5 和 iOS 版本小于 13 工作正常。但是升级到iOS 13+后,它不会从库中选择视频并返回权限错误作为响应。具体如何实现?
react-native - 无法在 NPM 命令行 (Windows) 上运行命令以使用图像选择器
我对 react-native 很陌生。
错误
获取依赖配置失败。
运行CLI with --verbose
标志以获取更多详细信息。当我尝试运行 react-native 链接时 react-native-image-picker
我尝试使用 yarn add react-native-config 进行安装,然后用谷歌搜索,几乎找不到任何东西。
react-native - 如何使用 Axios 将本地设备图像上传到 S3 存储桶
我需要将图像直接上传到 S3 存储桶。我正在使用 react native 和 react-native-image-picker 来选择照片。这将返回一个本地图像 uri。这是我现在的代码。
这几乎可以工作..当我检查我的 S3 存储桶时,我有一个几乎是图像的文件。它具有以下格式
如果我手动进入并删除标题,那么我就有了我的形象!但是,我需要将图像直接上传到 S3,客户将抓取并期望已经采用正确的图像格式。
我可以使用 response.data 并解码为字符串并直接上传它来完成这项工作,但为了记忆,我宁愿不这样做。
react-native - Expo(React Native)如何在没有 CAMERA_ROLL 权限的情况下访问图库和外部存储?
我有一个可怕的问题..我希望有人知道这个问题..
在作为 React Native 的包装 API 的 EXPO App 中,Expo Image picker 示例应用程序如何在不向用户请求任何外部存储访问权限的情况下访问图库(外部存储)?
原始源代码在这里.. https://docs.expo.io/versions/latest/sdk/imagepicker/
我尝试删除任何 askAsync(CAMERA_ROLL.permission) 或 getAsync(CAMERA_ROLL.permission)。所以示例应用程序没有访问外部存储的权限......但是!我按下按钮,它访问画廊......这怎么可能?我仔细检查了应用程序的权限,但没有授予外部存储权限...
请让我知道...我认为首先请求许可,然后访问外部存储是合适的。
PS我只用安卓手机测试过。
我从来没有检查过权限..