heigvd-software-engineering / bim-examples

A proof of concept for generating and visualizing BIM structures
MIT License
2 stars 0 forks source link

I can upload a file to the database via the server #11

Closed Moufblu closed 2 years ago

Moufblu commented 2 years ago

endpoint path: /files method: POST body: { name: string }

This endpoint adds a row to the files table. The name is set from the request body. The id is autoincrement. The path is an uuid (we keep the extension of the file). Example: 12l3kh2342l.ifc. The creation date is set by the database.

The file should be stored in the /static/files folder.