Roberto Rosario
e5bb00d514
Finish refactor of the new compressed file class support. Closes GitLab issue #7 .
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-09-05 00:40:10 -04:00
Roberto Rosario
3aecf817ce
Make source label field unique.
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-08-04 00:06:03 -04:00
Roberto Rosario
460570ed05
Don't provide a default for the scanner source adf_mode. Some scanners throw an error even when the selection if supported.
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-06-07 20:58:50 -04:00
Roberto Rosario
4d11234ba5
Fix error when trying to upload a document from and email account with 'from' and 'subject' metadata. Fix typo on message.header get from 'Suject' to 'Subject'. On multi part emails keep the original From and Subject properties for all subsequent parts if the sub parts don't specify them. Fixes issue #481 . Thanks to Robert Schöftner @robert.schoeftner for the report and debug information.
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-06-07 20:47:00 -04:00
Roberto Rosario
199ffde283
Sane scanner source paper source now defaults to blank.
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-05-10 17:52:55 -04:00
Eric Riggs
d97b080586
Flanker is not thread safe, hide the import until it is actually needed.
...
Signed-off-by: Eric Riggs <ericriggs42@gmail.com >
2018-04-26 02:17:33 -04:00
Roberto Rosario
eb2c7c6f34
Sort email sources models.
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-04-11 22:22:45 -04:00
Roberto Rosario
64ad07d95d
Add locking for interval sources. This reduces the chance of repeated documents from long running email downloads.
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-04-10 02:26:06 -04:00
Roberto Rosario
3618778737
Email source code cleanups. Use the header variable returned from flanker to extract the sender and the subject. Remove unsed scanimage usage via sh.
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-04-10 01:52:47 -04:00
Roberto Rosario
63a77d0235
Use Mailgun's flanker library to process the email sources.
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-04-10 01:16:53 -04:00
Michael Price
53239385ae
Add the "to=" keyword argument to all ForeignKey, ManayToMany and OneToOne Fields.
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 20:49:04 -04:00
Michael Price
e9a365333f
Rename the request_data variable to querystring for clarity. Turn the querystring into an IRI to support international characters in metadata values and allow JSON serializer for Celery.
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 20:30:40 -04:00
Michael Price
05966afe1e
Move post document upload processing of metadata and tags from sources.model to each wizard step.
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 20:30:25 -04:00
Michael Price
28aa0b913c
Reorganize and sort models and managers according to Mayan's best practices.
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 20:21:37 -04:00
Michael Price
d29d4ba110
Remove unused staging file method.
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 20:03:51 -04:00
Cornelius Ludmann
c29d7c6e5b
Decode base64 encoded e-mail attachment filename.
...
According to RFC 2231 the filename of e-mail attachments can be encoded,
e.g. with base64 (for example, the Brother ADS2800W Scanner does this).
Here an example how it looks like:
Content-Disposition: attachment; filename="=?UTF-8?B?QlJXMjg1NjVBOEI5RkQyXzIwMTcwNTIzXzIzMDMzN18wMDAzMDMucGRm?="
Signed-off-by: Cornelius Ludmann <dev@cornelius-ludmann.de >
2018-04-01 18:37:25 -04:00
Michael Price
984e8a5b2c
Silence deprecation warning about default manager for child models. Reorganize model according to Mayan's best practices.
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 18:25:32 -04:00
Roberto Rosario
f0baa16cde
Backport support for global and object event notification. GitLab issue #262 .
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2017-09-17 03:12:40 -04:00
Roberto Rosario
233aca8421
Consolidate intial document created event and the first
...
document properties edited events. Preserve the user that
initially creates the document. GitLab issue #433 . Thanks
to Jesaja Everling (@jeverling) for the report.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2017-09-05 03:22:37 -04:00
Roberto Rosario
03c8834772
Import collapse_rfc2231_value for the compatibility module.
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2017-08-29 02:05:33 -04:00
Roberto Rosario
de303fb897
Add tag_ids keyword argument to the Source.handle_upload
...
model method. GitLab issue #413 .
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2017-07-24 20:36:42 -04:00
Roberto Rosario
4096b8b882
PEP8 cleanups.
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2017-07-24 20:30:46 -04:00
Roberto Rosario
f09321f6ab
Fix deprecation warnings for Django 1.11 and Django 2.0.
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2017-07-21 00:25:18 -04:00
Roberto Rosario
e0e72e5426
Avoid sending the post_version_upload signal from inside an
...
uncommitted new document creation transaction.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2017-07-08 14:06:14 -04:00
Roberto Rosario
6c6ca38374
Replace all instances of unicode only handling to use force_text.
...
Replace all __unicode__ methods to __str__ and the
@python_2_unicode_compatible decorator.
Replace all instance of smart_str, smart_unicode, force_uncode
with force_text.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2017-07-05 15:03:24 -04:00
Roberto Rosario
3cb52c96be
Allow null for the SANE source resolution field.
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2017-06-30 17:47:47 -04:00
Roberto Rosario
14533da646
Merge branch 'master' into feature/sane_source
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2017-06-16 18:15:12 -04:00
Roberto Rosario
091bac591d
Add source and adf-mode fields to the sane scanner source. Make all fields optional.
...
Improve error handling.
2017-02-06 04:44:04 -04:00
Roberto Rosario
25f1f7d067
Add experimental SANE scanner source.
2017-02-05 04:02:12 -04:00
Roberto Rosario
c6890c487a
Extract a file like object's file name as per docs (using the .name property) and not an unicode representation of the file object instance. Reference: https://docs.python.org/2.7/library/stdtypes.html#file-objects
2016-03-30 01:32:53 -04:00
Roberto Rosario
5bb04cc8f4
Add newly uploaded document to the recent document list of the user.
2016-03-16 16:42:01 -04:00
Roberto Rosario
652613452b
Add new document upload wizard step to attach tags. GitLab issue #208 .
2016-02-05 03:25:27 -04:00
Roberto Rosario
97d8529994
Add boolean field to email source to control if the body of the email is to be stored or not.
2015-09-30 20:57:47 -04:00
Roberto Rosario
3d0c9485d0
Add support for storing the subject and "from" value of an email as metadata.
2015-09-30 20:20:27 -04:00
Roberto Rosario
654825829c
Store the body of emails as a document just like attachments.
2015-09-26 02:59:24 -04:00
Roberto Rosario
7392e80fc2
PEP8 Cleanups.
2015-08-24 20:55:45 -04:00
Roberto Rosario
28c45bf988
Add support for including a metadata dictionary as an attachment for the POP3 and IMAP sources.
2015-08-13 03:05:55 -04:00
Roberto Rosario
97f3451caf
Move statements according to code style.
2015-07-29 17:15:38 -04:00
Roberto Rosario
4527563d89
PEP8 cleanups, specially E501 line too long.
2015-07-22 18:21:37 -04:00
Roberto Rosario
76fef8ab8d
Don't error out when trying to delete a non existant periodic task.
2015-07-17 13:07:16 -04:00
Roberto Rosario
91a9b3b045
Finish document upload task refactor. Increase failure tolerance to database Operational Errors.
2015-07-15 04:36:23 -04:00
Roberto Rosario
1213175112
Sources app upload workflow refactoring.
2015-07-15 01:03:57 -04:00
Roberto Rosario
1b37a13bf5
Rename source upload handling methods to be more meaningful.
2015-07-14 10:20:19 -04:00
Roberto Rosario
133fcdc53c
Assign tasks to specific queues. Add support for transient queues. gh-issue #222 , gh-issue #230 .
2015-07-10 21:25:20 -04:00
Roberto Rosario
e891fe9525
PEP8 cleanups and code style cleanups.
2015-07-10 17:19:36 -04:00
Roberto Rosario
4c25314772
os.listdir returns str for non-latin filename, use unicode cast in path name to avoid this. Related to gh-issue #163 .
2015-07-08 02:02:24 -04:00
Roberto Rosario
4860b44daf
Rename source model title field to 'label'.
2015-07-07 23:30:52 -04:00
Roberto Rosario
e82a9d0c9f
Add missing import.
2015-07-07 02:58:55 -04:00
Roberto Rosario
8cc05bbefb
Initial commit of new document upload workflow which allows for document promises to be returned after POST request, gh-issue #194 . Add new signal when a document is uploaded and finally ready, gh-issue #193 and gh-issue #213 .
2015-07-05 03:33:27 -04:00
Roberto Rosario
e4623fadcd
PEP8 cleanups
2015-06-23 02:23:23 -04:00