image file info toegevoegd bij CMD+ENTER
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -79,6 +79,19 @@ async def pdf(
|
||||
)
|
||||
|
||||
|
||||
@router.get("/image")
|
||||
async def image(
|
||||
path: str,
|
||||
service: FileOpsService = Depends(get_file_ops_service),
|
||||
) -> StreamingResponse:
|
||||
prepared = service.prepare_image_stream(path=path)
|
||||
return StreamingResponse(
|
||||
prepared["content"],
|
||||
headers=prepared["headers"],
|
||||
media_type=prepared["content_type"],
|
||||
)
|
||||
|
||||
|
||||
@router.get("/thumbnail")
|
||||
async def thumbnail(
|
||||
path: str,
|
||||
|
||||
@@ -92,6 +92,8 @@ class FileInfoResponse(BaseModel):
|
||||
content_type: str | None = None
|
||||
owner: str | None = None
|
||||
group: str | None = None
|
||||
width: int | None = None
|
||||
height: int | None = None
|
||||
|
||||
|
||||
class SettingsResponse(BaseModel):
|
||||
|
||||
Reference in New Issue
Block a user