django图像存储cdn [英] django image storage cdn

查看:243
本文介绍了django图像存储cdn的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在django-imagekit和django-cumulus的过去几个月里使用了rackspace CDN。



我对结果并不满意。 p>

我似乎因为超时等而加载错误。

 文件/www/django_test1/omu2/src/python-cloudfiles/cloudfiles/connection.py,第347行,get_container 
return Container(self,container_name,count,size)

文件/www/django_test1/omu2/src/python-cloudfiles/cloudfiles/container.py,第83行,__init__
self._fetch_cdn_data()

文件/ www / django_test1 / omu2 / src / python-cloudfiles / cloudfiles / utils.py,第43行,装饰器
返回f(* args,** kwargs)

文件/ www / django_test1 / omu2 /src/python-cloudfiles/cloudfiles/container.py,第90行,在_fetch_cdn_data
response = self.conn.cdn_request('HEAD',[self.name])

文件/www/django_test1/omu2/src/python-cloudfiles/cloudfiles/connection.py,第151行,cdn_r equest
self.cdn_connection.request(方法,路径,数据,头)

文件/opt/python2.6/lib/python2.6/httplib.py,第898行,请求
self._send_request(method,url,body,headers)

文件/opt/python2.6/lib/python2.6/httplib.py,第915行, _send_request
self.putrequest(method,url,** skip)

文件/opt/python2.6/lib/python2.6/httplib.py,第802行,putrequest
raise CannotSendRequest()

CannotSendRequest

你们可以推荐? S3?

解决方案

亚马逊cloudfront一直非常适合为我们提供视频。请查看:
http://aws.amazon.com/cloudfront/



您可以使用boto包与其集成。



在此查看另一个示例:
http://www.peterbe.com/plog/hosting -django-static-images-with-amazon-cloudfront-cdn


I have been using rackspace CDN for the last few months with django-imagekit and django-cumulus.

And I am not really happy with the results.

I seem to get load of errors because of timeouts etc.

 File "/www/django_test1/omu2/src/python-cloudfiles/cloudfiles/connection.py", line 347, in get_container
   return Container(self, container_name, count, size)

 File "/www/django_test1/omu2/src/python-cloudfiles/cloudfiles/container.py", line 83, in __init__
   self._fetch_cdn_data()

 File "/www/django_test1/omu2/src/python-cloudfiles/cloudfiles/utils.py", line 43, in decorator
   return f(*args, **kwargs)

 File "/www/django_test1/omu2/src/python-cloudfiles/cloudfiles/container.py", line 90, in _fetch_cdn_data
   response = self.conn.cdn_request('HEAD', [self.name])

 File "/www/django_test1/omu2/src/python-cloudfiles/cloudfiles/connection.py", line 151, in cdn_request
   self.cdn_connection.request(method, path, data, headers)

 File "/opt/python2.6/lib/python2.6/httplib.py", line 898, in request
   self._send_request(method, url, body, headers)

 File "/opt/python2.6/lib/python2.6/httplib.py", line 915, in _send_request
   self.putrequest(method, url, **skips)

 File "/opt/python2.6/lib/python2.6/httplib.py", line 802, in putrequest
   raise CannotSendRequest()

CannotSendRequest

What can you guys recommend? S3?

解决方案

amazon cloudfront has been great for serving video for us. Check it here: http://aws.amazon.com/cloudfront/

You can use the boto package to integrate with it.

Check another example here: http://www.peterbe.com/plog/hosting-django-static-images-with-amazon-cloudfront-cdn

这篇关于django图像存储cdn的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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