added mapping for mimetype
fixed bug if no valid id submitted