简体   繁体   English

录制音频文件并将其上传到服务器以响应本机?

[英]record audio file and upload it to the server in react native?

i am very much sure that you guys have seen whats app recording feature , so i want to make module very much like this, i am making this app in react native hope you guys provide me proper solution我非常确定你们已经看到了什么是应用程序录制功能,所以我想制作非常像这样的模块,我正在制作这个应用程序以响应本机希望你们为我提供适当的解决方案

for this first i need to record file in cache or local directory then by getting uri of my audio file i have to store it to the s3为此,我首先需要将文件记录在缓存或本地目录中,然后通过获取我的音频文件的 uri 将其存储到 s3

this is my plan, so give me suggestion is this good idea or there is another way that i could do it more efficiently这是我的计划,所以给我建议是个好主意还是有另一种方法可以更有效地做到这一点

suggesst me the library for react native to record file and save it to the local and upload it to the amazon s3建议我使用本机的库来记录文件并将其保存到本地并上传到亚马逊 s3

The Mongo .aggregate() method is not supported, the reason being that MiniMongo does not support everything, so in order to get uniformity between client and server code, not all mongo methods are available.不支持 Mongo 的.aggregate()方法,原因是 MiniMongo 不支持一切,所以为了客户端和服务端代码的一致性,并不是所有的 mongo 方法都可用。

There is, however, a way to do it using this package: https://github.com/meteorhacks/meteor-aggregate然而,有一种方法可以使用这个包来做到这一点: https : //github.com/meteorhacks/meteor-aggregate

Basically it exposes the .aggregate() method for you基本上它为您公开.aggregate()方法

There is a package called collection helpers, but it doesn't work great for large data sets.有一个名为 collection helpers 的包,但它不适用于大型数据集。

This requirement is something that is easy to do in a SQL database, and often it's easier to create yourself a small mysql database to act as a data warehouse and run your reporting.这个要求在 SQL 数据库中很容易做到,而且通常更容易为自己创建一个小型 mysql 数据库来充当数据仓库并运行您的报告。 You'll need to update the database on say a daily basis, but that should be pretty quick to run.您需要每天更新数据库,但这应该可以很快运行。 You could even run it every hour, depending on data volumes and system loading.您甚至可以每小时运行一次,具体取决于数据量和系统负载。

Another way is to write some Mongo scripts that do some kind of transformation of your data into other documents that you can use for reporting.另一种方法是编写一些 Mongo 脚本,将数据转换为可用于报告的其他文档。

Depending on how much of this you need, you can decide on which way to go.根据您需要多少,您可以决定走哪条路。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM