简体   繁体   English

通过 laravel 文件存储在主机和容器中上传文件重复

[英]uploaded file duplication in host and container by laravel file storage

I configured the laravel application in the docker container on the Ubuntu server.我在 Ubuntu 服务器上的 docker 容器中配置了 laravel 应用程序。 Files uploaded with laravel file storage and linked php artisan storage:link .使用laravel 文件存储和链接php artisan storage:link上传的文件。 Files uploaded to laravel storage are available in both container and host.上传到 laravel 存储的文件在容器和主机中都可用。

Doesn't that mean duplication of the uploaded files, for example it exists in docker container also in project source code in ubuntu server?这是否意味着上传文件的重复,例如它存在于 docker 容器中,也存在于 ubuntu 服务器的项目源代码中?

I know that best way of storing uploaded files is some external space like aws s3, digitalocean spaces...我知道存储上传文件的最佳方式是一些外部空间,如 aws s3、digitalocean 空间......

No there is no duplication.不,没有重复。 The files only exist once on the host machine and are mounted in the container as views (read/write)这些文件在主机上只存在一次,并作为视图安装在容器中(读/写)

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

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