-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
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. |
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
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## master #253 +/- ##
==========================================
- Coverage 92.42% 92.16% -0.27%
==========================================
Files 29 30 +1
Lines 449 485 +36
Branches 55 55
==========================================
+ Hits 415 447 +32
- 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. |
Alright, no worries if you’re busy—there’s no pressure to respond right away. |
@olvr-me Sorry it took so long, but actions should be working now if you rebase your branch. I see that there were some warnings that should be fixed though https://github.com/VMelnalksnis/PaperlessDotNet/actions/runs/11784782522/job/32844179014?pr=253#step:7:1269 |
4643398
to
717cb97
Compare
Looks good to me, can ignore the missing code coverage. I merge the commits from PRs as is into master, so since it's ready to be merged, could you squash the WIP commits? I think all the changes releated to document download can be a single feat commit, the |
717cb97
to
846fbd8
Compare
Hi @VMelnalksnis, No worries about taking your time to respond - I just squashed the commits as you requested. |
I just noticed that I hadn't removed the unnecessary using directive. Since I don't have ReSharper installed, I didn't see that warning before pushing. Sorry about that. |
Yeah, I must have done something wrong with the PR checks, it checked master instead of your branch. No worries, I'll fix it in my next PR. |
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!