首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
社区首页 >问答首页 >提供上载多媒体内容的最佳方式

提供上载多媒体内容的最佳方式
EN

Stack Overflow用户
提问于 2018-05-04 07:32:26
回答 1查看 32关注 0票数 0

我目前正在开发一个网站,允许上传图片和其他文件。在这一点上,我有一些疑问。

第一个问题是,这些文件应该存储在哪里?我在考虑把它们存储在文件系统中。

第二,提供上传多媒体文件的最正确方式是什么?如果您使用文件系统作为存储介质,您应该使用服务器上配置的静态路由,还是有其他更好的选择?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-05-04 07:50:21

  • 文件应该存放在哪里? If the numbers of files are limited and not very much, then you can store it in the filesystem. However, if the number is large, I would recommend to store it in some storage service like AWS S3. Process could be either of two that you store temporarily the uploaded file in filesystem and then upload it in S3 or direct upload to S3. Depends on the use case.
  • 什么是最正确的方式提供上传的多媒体文件? In case you are using services like S3, you just have to set content type and expiration among other metadata while uploading and rest everything will be taken care by S3 only. In case you are storing data on filesystem, then you can use nginx/apache to serve the static assets files along with proper content type and other metadata.
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50169547

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档