Django:我自己的文件服务器上的sorl-thumbnail和托管映像文件 [英] Django: sorl-thumbnail and hosting image files on my own file server

查看:379
本文介绍了Django:我自己的文件服务器上的sorl-thumbnail和托管映像文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我非常喜欢 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.

  • 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆