Works with /data directory in server root.
Create file from request content
<root>/files/<fileName>
fileName The name of your file
POST
201 File created
409 The file already exist or writing error
Update file with request content
<root>/files/<fileName>
fileName The name of your file
Append Allows appending to file (true/false)
PUT
200 File updated
-
404 The file wasn't found
-
409 Writing error
Downloads a file.
<root>/files/<fileName>
fileName The name of your file
GET
The specified file's contents
404 The file wasn't found
Return file's metadata
<root>/files/<fileName>/meta
fileName The name of your file
GET
The JSON metadata for the file by the given Return value definitions
- name - the file name
- extension - the file extension
- size - the file size in bytes
- type - the file type
404 The file wasn't found
Return list of files in /data directory
<root>/files
GET
The JSON list of files in /data directory
- Storage files in compressed form through ZipArchive.
- Using validator for file limitation: max size, type, etc. Probably via VichUploaderBundle or IphpFileStoreBundle.
- Using https instead of http and authorizing mechanism. Realization via configuration security.yml.
- Access restriction to the file with adding additional information about file owner in file-model.