使用Nginx实现本地目录映射

如果文件是存储在服务器的某个位置,想提供pdf、jpg、png、mp4这些文件的预览功能,可以使用Nginx做虚拟映射,防止他人知道该文件的绝对路径.

如果想预览office文件,先将office文件转为pdf
https://www.cnblogs.com/lhxBlogs/p/15480722.html

参考博客:

比如这样,在nginx.conf的location编辑:

location /docs/biz
{
	alias E:/ruoyi/uploadPath;
}

注:苹果手机拍照格式为heic,预览不了

原文地址:https://www.cnblogs.com/lhxBlogs/p/15480087.html