File to byte array for image upload.