front end support for downloading multiple documents

This commit is contained in:
jonaswinkler
2021-02-20 16:10:50 +01:00
parent 31f03ef1d3
commit 203bc162cd
6 changed files with 59 additions and 21 deletions

View File

@@ -134,4 +134,8 @@ export class DocumentService extends AbstractPaperlessService<PaperlessDocument>
return this.http.get<PaperlessDocumentSuggestions>(this.getResourceUrl(id, 'suggestions'))
}
bulkDownload(ids: number[], content="both") {
return this.http.post(this.getResourceUrl(null, 'bulk_download'), {"documents": ids, "content": content}, { responseType: 'blob' })
}
}