Add bulk download options dropdown

This commit is contained in:
Michael Shamoon
2022-12-04 23:09:19 -08:00
committed by Trenton H
parent 812df3782a
commit 48ef8eca80
5 changed files with 171 additions and 53 deletions

View File

@@ -174,10 +174,18 @@ export class DocumentService extends AbstractPaperlessService<PaperlessDocument>
)
}
bulkDownload(ids: number[], content = 'both') {
bulkDownload(
ids: number[],
content = 'both',
useFilenameFormatting: boolean = false
) {
return this.http.post(
this.getResourceUrl(null, 'bulk_download'),
{ documents: ids, content: content },
{
documents: ids,
content: content,
follow_formatting: useFilenameFormatting,
},
{ responseType: 'blob' }
)
}