using the database ID as the file name is not going to be very practical.
to upload an image, and store it's in a database, the order of operations is:
File Upload
Database Insert.
The ID of the inserted record cannot be known until the record has been inserted.
because the upload happens before the insert, using the ID is not going to work very well.