@action onChangePhotoUpload = async (event) => { const file = event?.target?.files?.[0] if (!file) { return } if (!file.type?.startsWith('image/')) { notifyStore.error('$ERRORS.ONLY_SUPPORT_IMAGE') return } const signedBlobId = await uploadFile(file) const fileUrl = URL?.createObjectURL(file) const image = { id: `${TEMP_ID}_${nanoid()}`, signedBlobId, filename: file.name, contentType: file.type, fileUrl, } this.timesheetImages = [...this.timesheetImages, image] this.saveFirebaseData(this.submitData.id) }