mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-10-07 00:27:12 +00:00
Enhancment: Formatted filename for single document downloads (#12095)
--------- Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
This commit is contained in:
1 parent
5e1202a416
commit
c86ebc0260
7 files changed
+107
-18
No files matched your search
@@ -202,7 +202,8 @@ export class DocumentService extends AbstractPaperlessService<Document> {
|
||||
getDownloadUrl(
|
||||
id: number,
|
||||
original: boolean = false,
|
||||
versionID: number = null
|
||||
versionID: number = null,
|
||||
followFormatting: boolean = false
|
||||
): string {
|
||||
let url = new URL(this.getResourceUrl(id, 'download'))
|
||||
if (original) {
|
||||
@@ -211,6 +212,9 @@ export class DocumentService extends AbstractPaperlessService<Document> {
|
||||
if (versionID) {
|
||||
url.searchParams.append('version', versionID.toString())
|
||||
}
|
||||
if (followFormatting) {
|
||||
url.searchParams.append('follow_formatting', 'true')
|
||||
}
|
||||
return url.toString()
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user