mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-10-30 19:45:44 +00:00
Allow setting the ASN on document upload
This commit is contained in:
1 parent
1471dd72a6
commit
bec8d00232
5 files changed
+50
-7
No files matched your search
@@ -691,6 +691,14 @@ class PostDocumentSerializer(serializers.Serializer):
|
||||
required=False,
|
||||
)
|
||||
|
||||
archive_serial_number = serializers.IntegerField(
|
||||
label="ASN",
|
||||
write_only=True,
|
||||
required=False,
|
||||
min_value=Document.ARCHIVE_SERIAL_NUMBER_MIN,
|
||||
max_value=Document.ARCHIVE_SERIAL_NUMBER_MAX,
|
||||
)
|
||||
|
||||
def validate_document(self, document):
|
||||
document_data = document.file.read()
|
||||
mime_type = magic.from_buffer(document_data, mime=True)
|
||||
|
||||
Reference in new issue
Block a user