从反应本地网络错误上载图像数据到Flask API时出现问题?

时间:2020-04-16 15:45:21

标签: python react-native flask expo

我正在expo上构建一个反应本机应用程序,该应用程序可以拍摄照片并将该图像上载到在该图像上运行代码的flask API中。寻找有关从何处开始进行故障排除的指导,上传数据时出现错误。以下是详细信息:

Python Flask API::在localhost上运行docker,可以轻松地在Reactjs上使用浏览器进行访问。

React Native Expo::可以将照片从相机传递到预览,然后尝试将该图像加载到该烧瓶API。 // el_close.xml <merge xmlns:android="http://schemas.android.com/apk/res/android"> <Button android:id="@+id/button" android:layout_width="36dp" android:layout_height="36dp" android:background="@android:color/transparent" android:foreground="@drawable/ic_close_small" /> </merge>

我尝试使用// main_layout.xml ... <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:paddingHorizontal="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" android:paddingBottom="28dp"> <include android:id="@+id/close" layout="@layout/el_close" /> ... </LinearLayout> 和{2}像素运行iOS模拟器,但使用以下错误:

Expo 3.17.24

以下是我的代码的相关摘要,可以肯定地到达测试api:

PreviewScreen.js

npm run ios

有什么想法吗?我的Flask api使用开发自签名证书运行。想知道这是否是问题。问题是它可以从reactjs网站上的浏览器正常运行。

0 个答案:

没有答案