Medien: library-Pfade nach Medientyp (image/video/pdf/other) unterteilen
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
8d85649cf8
commit
3e4fa0dc39
6 files changed
+89
-20
No files matched your search
@@ -2525,6 +2525,7 @@ async def upload_exercise_media(
|
||||
full_sha,
|
||||
ext,
|
||||
uploader_profile_id=profile_id if ex_vis == "private" else None,
|
||||
mime_type=mime,
|
||||
)
|
||||
except ValueError as e:
|
||||
raise HTTPException(status_code=400, detail=str(e)) from e
|
||||
|
||||
@@ -340,6 +340,7 @@ def _relocate_asset_file_if_governance_changed(
|
||||
sha,
|
||||
ext,
|
||||
uploader_profile_id=up_i if next_vis == "private" else None,
|
||||
mime_type=str(asset.get("mime_type") or "") or None,
|
||||
)
|
||||
except ValueError as e:
|
||||
raise HTTPException(status_code=400, detail=str(e)) from e
|
||||
@@ -630,6 +631,7 @@ def _ingest_library_media_file(
|
||||
full_sha,
|
||||
ext,
|
||||
uploader_profile_id=profile_id if vis == "private" else None,
|
||||
mime_type=mime,
|
||||
)
|
||||
except ValueError as e:
|
||||
raise HTTPException(status_code=400, detail=str(e)) from e
|
||||
@@ -1009,7 +1011,7 @@ def bulk_media_patch(
|
||||
try:
|
||||
cur.execute(
|
||||
"""SELECT id, visibility, club_id, uploaded_by_profile_id, lifecycle_state,
|
||||
copyright_notice, original_filename, sha256, storage_key, storage_backend
|
||||
copyright_notice, original_filename, sha256, storage_key, storage_backend, mime_type
|
||||
FROM media_assets WHERE id = %s""",
|
||||
(asset_id,),
|
||||
)
|
||||
@@ -1113,7 +1115,7 @@ def patch_media_asset(
|
||||
cur = get_cursor(conn)
|
||||
cur.execute(
|
||||
"""SELECT id, visibility, club_id, uploaded_by_profile_id, lifecycle_state,
|
||||
copyright_notice, original_filename, sha256, storage_key, storage_backend
|
||||
copyright_notice, original_filename, sha256, storage_key, storage_backend, mime_type
|
||||
FROM media_assets WHERE id = %s""",
|
||||
(asset_id,),
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user