我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

nginx上的内容处理标题

I'm running a file hosting site on nginx where files are stored on the server with random file names.

When a user wants to download the file, I'd like to fetch the original name from a MySQL database and download it with that name using content-disposition.

I also want this to work with direct links to the file but have no idea how to set content-disposition this way. I've seen other sites do this, but I'm not sure how to build it myself.

近期文章

  • 每次刷新页面时,它都会将相同的用户插入数据库
  • Magento产品属性“管理标签/选项”内容未显示
  • 初始化ReflectionClass类型的php对象:: newInstanceWithoutConstructor()
  • 在设定日期到期的PHP重定向
  • 列出组中的LDAP组
  • OneupUploaderBundle上传图片但不调用EventListener
  • xampp无法在Windows 7中运行
  • Laravel 5中的动态表格和模型
  • 无法从jquery中的Json_encode获取值
  • Symfony 2访问formtype的实体数据
  • 将CKEditor数据保存到服务器上的HTML文件
  • CodeIgniter上传图像/ pdf表单验证
  • Javascript:搜索自动完成 - 从mysql数据库中获取结果?
  • php exec(python)返回unicode
  • Session Redis更改每个新的重新加载Web浏览器
  • 选择Box以获取更新值
  • JQuery.ajax()表现得很奇怪,还是我错过了什么?
  • 如何维护wordpress和django之间的会话?
  • 动态评论功能代码
  • 来自curl php的资源ID#4响应

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华