简体   繁体   English

存储照片/视频的最佳方法是什么

[英]what's best way to store photo/video

I am developing app which will let user to upload his/her photos/videos. 我正在开发可让用户上传他/她的照片/视频的应用程序。

I thought of some ways to do it. 我想到了一些方法。

1) Store image in mysql (I am not sure about videos) 1)将图像存储在mysql中(我不确定视频)

2) store images and videos in separate folder and give path of that image/video in database table against owner of image/video. 2)将图像和视频存储在单独的文件夹中,并针对图像/视频的所有者在数据库表中提供该图像/视频的路径。

3) Create separate directories for all the users and store directly into directory and assign that path to database against owner of the image/video. 3)为所有用户创建单独的目录,并将其直接存储到目录中,然后根据图像/视频的所有者将该路径分配给数据库。

which of these is best to use for mobile app ? 以下哪项最适合用于移动应用程序?

Any Help would appreciated. 任何帮助将不胜感激。

最好的方法是将多媒体文件存储到Web服务器的静态内容中,并将它们的相对路径以及文件名存储在数据库中

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

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