0

pylons フレームフォークを使用し、いくつかの画像を gridfs に保存します。

このコードは、MacOS および Linux サーバーに最適です。

f = self._fs.get(ObjectId(image))
# In linux unicode u'image/jpg' raise error, thats why I use str() for content-type
response.headers['Content-type'] = str(f.content_type)
return f.read()

Windows では、「画像を読み取れません」というエラーが表示されます。理由は?

4

0 に答える 0