fileshandling
Module Contents
Functions
|
|
|
|
|
Download file from server |
|
Attributes
- fileshandling.router
- fileshandling.upload_dir
- fileshandling.allowed_mime_types = ['text/csv', 'application/pdf', 'text/plain', 'chemical/x-cif',...
- async fileshandling.create_upload_file(file: fastapi.UploadFile = File(...))
- async fileshandling.create_upload_file(file: fastapi.UploadFile = File(...))
- fileshandling.get_file(name_file: str) fastapi.responses.FileResponse
Download file from server
- Parameters
name_file (str) – file name to download expressed as <hash>.<ext>
- Raises
HTTPException – HTTP Error 404 if file not found
- Returns
binary stream of file
- Return type
FileResponse
- fileshandling.delete_file(name_file: str)