Version label

This commit is contained in:
shamoon
2026-02-10 09:16:20 -08:00
parent 719582938e
commit 224a873de2
7 changed files with 87 additions and 8 deletions

View File

@@ -191,9 +191,12 @@ export class DocumentService extends AbstractPaperlessService<Document> {
return url
}
uploadVersion(documentId: number, file: File) {
uploadVersion(documentId: number, file: File, label?: string) {
const formData = new FormData()
formData.append('document', file, file.name)
if (label) {
formData.append('label', label)
}
return this.http.post(
this.getResourceUrl(documentId, 'update_version'),
formData,