filedrop
Data Base
File_Info
- UUID -- UUID
- Name -- Char
- mime_type -- Char
- uploaded_at -- Unix Time Stamp
- Owner -- key to users
- is_public -- bool -- display file in get list
Data
- UUID -- UUID
- MD5 -- MD5 hash
- Path -- char Path to file on local disk
- Created -- Unix Time Stamp
- Size -- Number -- size in bytes
Users
Simple table as a place holder for user seeded with a anon
user and usable password
- Name varchar(160)
- Password varchar(255)
v1 API endpoints
JSON API
/v1/files
GET
Return a JSON list of all files.
POST
Takes a new file, retuning the UUID and MD5 of the file. In the user is not logged in, it will belong to anon
/v1/files/{UUID}
GET
return the file with correct MIME type as RAW data.
PUT
Post new file data about file. Editable fields are type
and is_public
.
DELETE
removes file.
/v1/files/{user}
get
Return a JSON list of all files for a user.
Description