Database support for uploading images