I have users with their own private storage. They can access their
files using a function that returns the files. Here is a snippet of
code:
response.headers['Content-Type'] =
mimetypes.types_map[filetype]
path=os.path.join(request.folder,('uploads/'),filename)
return response.stream(open(path,'rb'),chunk_size=1024)
The issue I'm having is that I'm seeing this type message in the
chrome console:
Resource interpreted as Document but transferred with MIME
type image/png
and when I try to get image dimensions in javascript, they come up as
0 height & 0 width. Is there a way to get around this?
Also, when I view the image in a browser window or save the image to
disk there are no problems