Step 1 of 6
Define upload requirements
Decide file types, limits, and storage before writing upload code.
Define the file upload spec. Specify: allowed file types (e.g. jpg/png/pdf) and max size; where files are stored for this MVP (server uploads directory, database, or object storage) and the tradeoff; the file record model (id, owner, filename, storedPath/url, mimetype, size, uploadedAt); unique storage naming to prevent collisions; and which users can see/delete which files.
Expected after this step
A storage decision plus a complete file record model and limits.
Should not happen
- ✕Local preview shown as if uploaded, gone after refresh
- ✕No size/type validation on the server
- ✕Uploads that overwrite files with identical names
- ✕Broken image links because paths/URLs are wrong
Verify before continuing
Do not move on until every check is true. The complete button stays locked until then.
Do not continue if…
- !Local preview shown as if uploaded, gone after refresh
- !No size/type validation on the server
- !Uploads that overwrite files with identical names
- !Broken image links because paths/URLs are wrong
If the AI messes this up
Use this when the AI fakes progress or breaks the feature. It forces a real fix.
The spec has no storage decision or owner linkage. Choose the storage mechanism now and add ownerId plus unique stored filenames to the model.