cthit / cthit/TasteIT

Store PDF from upload button POST

Open
#9 0 comments 0 reactions 0 assignees View on GitHub
good first issue
Dominant language
JavaScript
Stars
0
Forks
2
PR merge metrics
No merged PRs in 30d

Description

This issue goes hand-in-hand with #4

- [ ] We need to add a listener function to the backend that listens for POST requests on an URL, e.g. '/upload'. The incoming requests can simply be printed/logged for now.
- [ ] Now we want to read the incoming data and store the file under the statically hosted folder from #8 , e.g. `/recipes'
- [ ] We want the function that stores the files to ensure that the files are given unique names, so that no collisions occur. An example approach would be to randomize a name for the file, check if it exists and keep randomizing the name until we find one that doesn't already exist.
- [ ] Finally, the backend should respond with the URL of the new recipe. That, or just respond with name of the file, because you can `calculate` the URL from that information.

Contributor guide

No contributing guide indexed for this repository

Research direction

Read issues #4 and #8 first, then locate the backend entry point for handling HTTP POST requests. Implement the /upload flow described in the checklist, including storage under /recipes, collision-free names, and a response containing the new recipe URL or filename.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.