V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
banxi1988
V2EX  ›  V2EX

V2EX没有检测上传图片类型,导致抛出错误,原因我虽然选择了svg类型的图片,但是还是上传了。 结果:

  •  
  •   banxi1988 · 2012-11-25 16:43:40 +08:00 · 2256 次点击
    这是一个创建于 4196 天前的主题,其中的信息可能已经有所发展或是发生改变。
    Traceback (most recent call last):
    File "/usr/local/lib/python2.7/dist-packages/tornado/web.py", line 1042, in _execute
    getattr(self, self.request.method.lower())(*args, **kwargs)
    File "/usr/local/lib/python2.7/dist-packages/tornado/web.py", line 1809, in wrapper
    return method(self, *args, **kwargs)
    File "/www/v2ex/galaxy/handlers/web/settings.py", line 373, in post
    avatar73 = self.rescale(avatar, 73, 73)
    File "/www/v2ex/galaxy/handlers/__init__.py", line 432, in rescale
    img = pil.open(input_file)
    File "/usr/lib/python2.7/dist-packages/PIL/Image.py", line 1980, in open
    raise IOError("cannot identify image file")
    IOError: cannot identify image file
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2169 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 15:59 · PVG 23:59 · LAX 08:59 · JFK 11:59
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.