-
Notifications
You must be signed in to change notification settings - Fork 35
Upload Process
Seán Lynch edited this page May 5, 2023
·
10 revisions
-
Request Verification
- The file should be an image
-
Extra Verification
- We extract the EXIF data and check it for GPS keys.
- If no GPS keys are found, a 500 error is thrown and the process is aborted.
- We extract the EXIF data and check it for GPS keys.
-
Check For Duplicates
- We check the
dateTime
the image was taken at. - The user will get an error if they try to upload the same photo twice.
- We check the
- We use AWS S3 on production, DigitalOcean on staging, and
public/local-uploads/
on development/testing environments. - The photo is resized to 500 x 500 dimensions for the OpenLitterAI.
- The photo is stored in a filesystem according to its creation date: year/month/day/fileHashName.jpg
- Create New Locations
- If a new location is created, we fire these events:
NewCountryAdded
,NewStateAdded
, andNewCityAdded
. - These need to move to after the Photo was created.
- If a new location is created, we fire these events:
- We need to move the Users XP to Redis.
- We need daily, weekly, monthly Leaderboards.
- After everything is done, we should dispatch all notifications last.
- Image Uploaded
- Locations Created should move here
- Increment PhotosPerMonth
- We also need PhotosPerDay