forked from retoor/devplacepy
feat: add zip file extraction support with error handling for invalid archives
This commit is contained in:
@@ -280,6 +280,30 @@ ACTIONS: tuple[Action, ...] = (
|
||||
body("path", "Relative path to delete.", required=True),
|
||||
),
|
||||
),
|
||||
Action(
|
||||
name="zip_project",
|
||||
method="POST",
|
||||
path="/projects/{project_slug}/zip",
|
||||
summary="Build a downloadable zip archive of a whole project",
|
||||
description=(
|
||||
"Queues a background zip job and returns {uid, status_url}. Poll the status_url with "
|
||||
"zip_status until status is 'done', then give the user the download_url."
|
||||
),
|
||||
params=(path("project_slug", "Project slug or uid."),),
|
||||
requires_auth=False,
|
||||
),
|
||||
Action(
|
||||
name="zip_status",
|
||||
method="GET",
|
||||
path="/zips/{uid}",
|
||||
summary="Check a zip job and obtain its download link once finished",
|
||||
description=(
|
||||
"Returns the job status and stats. When status is 'done', download_url points at the "
|
||||
"ready archive; while 'pending' or 'running', poll again shortly."
|
||||
),
|
||||
params=(path("uid", "Zip job uid returned by zip_project."),),
|
||||
requires_auth=False,
|
||||
),
|
||||
Action(
|
||||
name="search_users",
|
||||
method="GET",
|
||||
|
||||
Reference in New Issue
Block a user