login


新东西 呵呵 JS3D

Thursday, Jan.. 22. 2009 –  Category: GAE 开发  –  0 Comments
Tags: Google App Engine 

http://ihere.appspot.com/album/

http://ihere.appspot.com/album/OuterHeaven/


JS 的伪3D  蛮赞 哈哈  javaeye 看到的  就改了下
用到了google的 images api 来做resize  生成icon
感觉不错

file = request.FILES['file']
            userfile = UserFile(  mimetype=request.META['CONTENT_TYPE'],
                                    author = users.get_current_user(),
                                    size = file.size,
                                    name=file.name,
                                    comment=request.REQUEST.get('comment',''))
            bin=file.read()
            try:
                userfile.icon=images.resize(bin, width=60)
            except:
                pass
               
            userfile.save()

test 里要加images的stub了 否则出错  (gae实际环境用不了这个 所以做了判断 只在本地用)
from appenginepatcher import on_production_server
if not on_production_server:
    from google.appengine.api.images import images_stub

if not on_production_server:
            apiproxy_stub_map.apiproxy.RegisterStub('images', images_stub.ImagesServiceStub())

    Share in Google Reader     Share in Twitter..     Share in Friendfeed     Leave a Reply

0 Response to “新东西 呵呵 JS3D”

Leave a Reply


Logo

About Me

  • A Computer Geek in Beijing, China. Focus on Web2.0 Technology: Google App Engine, Python, Django, Software Architecture, Agile, JAVA, J2EE, JavaScript, etc.

    Coding for fun, Coding with passion :-) It's my life!

Most Popular Posts

Tags