mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-10 08:07:59 -06:00
feat: Add asn to upload multipart request
This commit is contained in:
@@ -13,6 +13,7 @@ abstract class PaperlessDocumentsApi {
|
||||
int? documentType,
|
||||
int? correspondent,
|
||||
Iterable<int> tags = const [],
|
||||
int? asn,
|
||||
});
|
||||
Future<DocumentModel> update(DocumentModel doc);
|
||||
Future<int> findNextAsn();
|
||||
|
||||
@@ -20,6 +20,7 @@ class PaperlessDocumentsApiImpl implements PaperlessDocumentsApi {
|
||||
int? documentType,
|
||||
int? correspondent,
|
||||
Iterable<int> tags = const [],
|
||||
int? asn,
|
||||
}) async {
|
||||
final formData = FormData();
|
||||
formData.files.add(
|
||||
@@ -41,6 +42,9 @@ class PaperlessDocumentsApiImpl implements PaperlessDocumentsApi {
|
||||
if (documentType != null) {
|
||||
formData.fields.add(MapEntry('document_type', jsonEncode(documentType)));
|
||||
}
|
||||
if (asn != null) {
|
||||
formData.fields.add(MapEntry('archive_serial_number', jsonEncode(asn)));
|
||||
}
|
||||
for (final tag in tags) {
|
||||
formData.fields.add(MapEntry('tags', tag.toString()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user