diff --git a/src/photo/actions.ts b/src/photo/actions.ts index 3878db82..b6673a2e 100644 --- a/src/photo/actions.ts +++ b/src/photo/actions.ts @@ -52,11 +52,14 @@ import { convertUploadToPhoto } from './storage'; export const createPhotoAction = async (formData: FormData) => runAuthenticatedAdminServerAction(async () => { + const shouldStripGpsData = formData.get('shouldStripGpsData') === 'true'; + formData.delete('shouldStripGpsData'); + const photo = convertFormDataToPhotoDbInsert(formData); const updatedUrl = await convertUploadToPhoto( photo.url, - formData.get('shouldStripGpsData') === 'true', + shouldStripGpsData, ); if (updatedUrl) {