using the album id in the file name wont work because of the order of how things happen.
normally, the File is uploaded to the server first, then the file name is stored in the database.
you cant use the ID of the inserted record in the folder name for the file because the file has not been uploaded yet.
you then changed the order so that the file was uploaded after the record was inserted, this caused the file name to not be stored in the database. That happened because the file was not uploaded yet.
The only real way to get this to work is to have the insert occur, this saves the ID to a session.
then have the upload occur, and use the session for the folder name. Then do an update to update the record with the uploaded file name, use the Session variable to tell it which record to update.