The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Will there be any problem if I ignore the original file type of the image and export them in jpg format?

There will be, for some users, yes. If whatever program they use to view the image tries to rely on the extension, and the contents of the file are not in fact a jpeg-encoded image, then they won't be able to see it.

There will be, for some users, yes. If whatever program they use to view the image tries to rely on the extension, and the contents of the file are not in fact a jpeg-encoded image, then they won't be able to see it.

Hmm.. Thanks Dan Grossman...

A silly question here:

If I manage to view the file after downloaded from server, then everything should be fine right?

It's fine for you, but not for all image viewers. If you want it to be fine for everyone, then the file extension should match what's in the file.

I bet you can figure out the real file type looking at just the beginning of the file, then send the right extension and content-type headers. Just look up the specification for the image formats you've stored and figure out what the file contents look like.

Write a little program that examines each BLOB, figures out what file type is in there, and updates a new column to store the type. Then you won't have this problem when it's time to send that file to someone.

It's fine for you, but not for all image viewers. If you want it to be fine for everyone, then the file extension should match what's in the file.

I bet you can figure out the real file type looking at just the beginning of the file, then send the right extension and content-type headers. Just look up the specification for the image formats you've stored and figure out what the file contents look like.

Write a little program that examines each BLOB, figures out what file type is in there, and updates a new column to store the type. Then you won't have this problem when it's time to send that file to someone.