| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -276,15 +276,15 @@ You can also directly stream the output into a file, and unzip it afterwards:: | |||
| 276 | 276 | ||
| 277 | 277 | Or, you can also use the underlying response iterator directly:: | |
| 278 | 278 | ||
| 279 | - artifact_bytes_iterator = build_or_job.artifacts(streamed=True, action='iterator') | ||
| 279 | + artifact_bytes_iterator = build_or_job.artifacts(iterator=True) | ||
| 280 | 280 | ||
| 281 | 281 | This can be used with frameworks that expect an iterator (such as FastAPI/Starlette's | |
| 282 | 282 | ``StreamingResponse``) to forward a download from GitLab without having to download | |
| 283 | 283 | the entire content server-side first:: | |
| 284 | 284 | ||
| 285 | 285 | @app.get("/download_artifact") | |
| 286 | 286 | def download_artifact(): | |
| 287 | - artifact_bytes_iterator = build_or_job.artifacts(streamed=True, action='iterator') | ||
| 287 | + artifact_bytes_iterator = build_or_job.artifacts(iterator=True) | ||
| 288 | 288 | return StreamingResponse(artifact_bytes_iterator, media_type="application/zip") | |
| 289 | 289 | ||
| 290 | 290 | Delete all artifacts of a project that can be deleted:: | |
| Back | FazBrowse Home | New Git URL |
0 commit comments