[英]React native image upload to MySQL using PHP
How to upload an image from React Native into MySQL using PHP?如何使用 PHP 从 React Native 上传图像到 MySQL? I have used the React Native image picker to choose the image but how can I upload it to MySQL using PHP?
我已经使用 React Native 图像选择器来选择图像,但如何使用 PHP 将其上传到 MySQL?
The answer to your question consists of two parts :你的问题的答案包括两部分:
For the mobile part (React native):对于移动部分(React Native):
You could use this library你可以使用这个库
OR following this article that mentions a step-by-step image uploading:或者按照这篇提到逐步上传图片的文章:
Uploading Images From React Native To Your Server 从 React Native 上传图片到你的服务器
Now it comes to the second part:现在进入第二部分:
You should allow your php code to receive images from the form data submitted您应该允许您的 php 代码从提交的表单数据中接收图像
You could follow the following helpful article : Upload Image to Database and Server using HTML,PHP and MySQL您可以参考以下有用的文章: 使用 HTML、PHP 和 MySQL 将图像上传到数据库和服务器
And this question is wonderful too.而且这个问题也很精彩。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.