Buckets:
AnonymousSpottedToad/human_verified_bucket / codebase /python /Nostalgia-Season-Train_DesksetBack /test /router /cloud.py
| import mimetypes | |
| from fastapi import APIRouter | |
| from fastapi.responses import FileResponse | |
| from deskset.core.root_path import RootPath | |
| router_cloud = APIRouter(prefix='/v0/cloud', tags=['在线文件']) | |
| # folder:根文件夹?名称 | |
| # relpath:根文件夹下相对路径 | |
| async def get_date(folder: str, relpath: str): | |
| root = RootPath('folder_abspath') # 开发中 | |
| file_path = root.get_abspath(relpath) | |
| file_type, _ = mimetypes.guess_type(file_path) # 判断文件类型 | |
| return FileResponse(path=file_path, media_type=file_type) | |
Xet Storage Details
- Size:
- 601 Bytes
- Xet hash:
- ff2053d3434c2416876bb7346e949596a098a8b3545f32375b0cc5ae665ae291
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.