This repository contains the API routes for the excalidraw-saver application.
/api/upload
- APOST
route that uploads files to the server's/uploads
directory. The route acceptsmultipart/formdata
content and utilises formidable to parse the form's contents. The files are saved according to the URL generated for each specific file, which eventually become the file names./api/getFiles
- AGET
route that fetches all the file names that are present in the/uploads
directory/api/download
- AGET
route that takes aquery
parameter of the form?fileName=
, where the file name is passed from the client application