Django:我自己的文件服务器上的sorl-thumbnail和托管映像文件 [英] Django: sorl-thumbnail and hosting image files on my own file server
问题描述
我非常喜欢 sorl-thumbnail 图书馆,我想存储图片文件不在当前应用程序(django)服务器,但是(另一个)我自己的文件服务器与webserver提供静态文件。
I like very much sorl-thumbnail library and I want to store image files not in current application (django) server, but to (another) my own file server with webserver for serving static files.
- 我必须写自定义django存储还是不写?
- 如何将文件上传到远程静态文件服务器?
- 如果我有很多应用程序(django)服务器和许多文件服务器?
- 最好使用自定义文件上传处理程序 一>?如果没有,那么什么时候有用?如果是,那么如何使用sorl-thumbnail?
- Do I have to write custom django storage or not?
- How can I upload files to remote static file server(s)?
- What if I have many application (django) servers and many file servers?
- Is it better to use custom file upload handler? And if not then when is it useful? And if yes then how to use it with sorl-thumbnail?
P.S。我不知道什么是正确的(好的)这样做,因为我没有太多的网页编程和Django经验。
P.S. I'm not sure what is the right (good) way to do this, because I have not much experience in web programming and Django.
推荐答案
我认为这个 Django:如何提供用户提交的图像&单独的多个服务器的缩略图?问题适合您的想法。
I think the answer to this Django: how to serve user-submitted images & thumbnails from separate, multiple servers? question fits your idea.
因为否则您不能将文件上传到远程机器。或者您将开发您的脚本,以通过使用scp或类似的东西将文件上传到另一个主机。
Because otherwise you can't just upload the file simply to remote machine. Or you will develope your script to upload files to another host by using scp or something like this...
干杯,
Ignas
Cheers, Ignas
这篇关于Django:我自己的文件服务器上的sorl-thumbnail和托管映像文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!