-
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/#8 Add support to download documents #253
base: master
Are you sure you want to change the base?
Feature/#8 Add support to download documents #253
Conversation
❌ Found 0 compliant commit and 7 non-compliant commits in 8c90362...d74a818. Commit 8c90362 by @olvr-me is not conform to the conventional commit specification :
Commit a16423d by @olvr-me is not conform to the conventional commit specification :
Commit a3b8184 by @olvr-me is not conform to the conventional commit specification :
Commit 31b870c by @olvr-me is not conform to the conventional commit specification :
Commit fe7d1df by @olvr-me is not conform to the conventional commit specification :
Commit 5439c5e by @olvr-me is not conform to the conventional commit specification :
Commit d74a818 by @olvr-me is not conform to the conventional commit specification :
|
d74a818
to
e6c1360
Compare
source/VMelnalksnis.PaperlessDotNet/Documents/DocumentContent.cs
Outdated
Show resolved
Hide resolved
source/VMelnalksnis.PaperlessDotNet/Documents/DocumentContent.cs
Outdated
Show resolved
Hide resolved
source/VMelnalksnis.PaperlessDotNet/Documents/DocumentClient.cs
Outdated
Show resolved
Hide resolved
source/VMelnalksnis.PaperlessDotNet/Documents/DocumentClient.cs
Outdated
Show resolved
Hide resolved
source/VMelnalksnis.PaperlessDotNet/Documents/IDocumentClient.cs
Outdated
Show resolved
Hide resolved
tests/VMelnalksnis.PaperlessDotNet.Tests.Integration/Documents/DocumentClientTests.cs
Outdated
Show resolved
Hide resolved
tests/VMelnalksnis.PaperlessDotNet.Tests.Integration/Documents/DocumentClientTests.cs
Outdated
Show resolved
Hide resolved
tests/VMelnalksnis.PaperlessDotNet.Tests.Integration/Documents/DocumentClientTests.cs
Outdated
Show resolved
Hide resolved
tests/VMelnalksnis.PaperlessDotNet.Tests.Integration/Documents/DocumentClientTests.cs
Outdated
Show resolved
Hide resolved
tests/VMelnalksnis.PaperlessDotNet.Tests.Integration/Documents/DocumentClientTests.cs
Outdated
Show resolved
Hide resolved
Hi @olvr-me, I went through the changes and had some comments, if something's not clear or you disagree with something let me know. From the documentation it looks like preview and thumbnail should work the same, so maybe you could also add methods for that as part of this PR. The only thing that looks different is the request URI, so you could create a private method |
Thank you so much for the quick and detailed feedback! There was just one comment I wasn’t entirely clear on, so I’ve left a follow-up question there for you when you have a moment. |
…ediatype and filename property
…et when downloading the thumbnail
Hi @VMelnalksnis, I’ve implemented the suggested changes—thanks again for your feedback! I also had three follow-up questions, which I left in comments at the relevant changes. If you have a moment to look over those, I’d love to hear your thoughts. |
tests/VMelnalksnis.PaperlessDotNet.Tests.Integration/Documents/DocumentClientTests.cs
Show resolved
Hide resolved
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #253 +/- ##
==========================================
- Coverage 92.37% 92.05% -0.33%
==========================================
Files 29 30 +1
Lines 446 478 +32
Branches 55 55
==========================================
+ Hits 412 440 +28
- Misses 19 23 +4
Partials 15 15 ☔ View full report in Codecov by Sentry. |
I'll take a look (again) on how to correctly setup actions with secrets. I can't seem to be able to get it working both for myself when working with branches, and for others working with forks. |
…ream for NET6 and newer
Alright, no worries if you’re busy—there’s no pressure to respond right away. |
Hello @VMelnalksnis,
I came across issue #8 in your library and thought adding download functionality might be a useful enhancement, so I gave it a try and submitted a PR.
I wasn’t sure if you generally welcome PR contributions from others, so please feel free to give any feedback or decline the PR if it doesn’t align with your vision - this is your project, and I completely respect your direction.
I referred to the endpoint and functionality described here: Paperless API - Downloading Documents. I’m fairly new to Paperless, so I hope I’ve understood everything correctly. I added test cases to your IntegrationTest project, and they all passed successfully. I incorporated the download functionality into the existing create-test flow, where the document is downloaded and the ContentType, FileName, and content are checked against expected values. I used the presence of "lorem ipsum" in both the filename and content as validation to ensure everything is working as expected.
Since this is my first open-source contribution, I’m happy to receive any feedback you may have.
Thank you for creating/maintaining this project and considering my contribution!