test function for uploading images