英文:
Ftp-Storage Implementation in React-Native App
问题
我正在使用RN构建一个具有C#后端的应用程序。
在我的应用程序中,包括一个博客,我需要已登录的用户能够上传和下载文件,比如图片或视频。
什么是最佳实现方式?因为我找不到一个兼容Android和iOS的包。
我会非常感谢您的回应。谢谢!
我在Hostinger上有一个VPS,它为我提供了FTP访问权限。然而,RN的FTP包只与Android应用程序兼容。也许我需要一些其他的指导。
英文:
I'm building an application in RN that has a C# backend.
In my application, which includes a blog, I need the logged-in user to be able to upload and download files, such as images or videos.
What is the best implementation? Because I can't find a package that is compatible with both Android and iOS.
I would greatly appreciate your response. Regards!
I have a VPS on Hostinger, which provides me with FTP access. However, FTP packages for RN are only compatible with Android apps. Perhaps I need some other guidance.
答案1
得分: 0
要从服务器上载和下载文件,您必须创建一个REST API,通过它可以上传文件。一个可以列出可下载文件的API。
要上传文件,请使用此 教程。
要从链接下载文件,请使用此 教程。
可以帮助您的软件包是react-native-fs。
英文:
to upload and download files from a server you have to create a REST API with which you can upload a file. an api which can list files from the server that can be downloaded.
To upload file Please use this tutoril
to Download a File from a link use this tutoril
the package that can help you is react-native-fs
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论