Displaying 1 result from an estimated 1 matches for "find_flash_upload_mime_type".
2005 Dec 16
0
upload problem with mimetypes
...ad it first.
To get around this I am finding the file extension and overriding the
content_type variable with my new variable from a look up list for
example "jpg" would then use image/jpeg. This works well with most
images however some do not display correctly and I get this error:
def find_flash_upload_mime_type (ext)
re = /(\.)/
md = re.match(ext)
type = case md.post_match.downcase
when "jpg" : "image/jpeg"
... more case statements for other file types ...
else "application/octet-stream"
end
return type
end
The image "htt...