-
-
Notifications
You must be signed in to change notification settings - Fork 154
Split attachment paths #848
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
Conversation
e6dcf69
to
628b68b
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #848 +/- ##
============================================
- Coverage 60.28% 60.24% -0.04%
- Complexity 5972 5982 +10
============================================
Files 525 525
Lines 20348 20383 +35
============================================
+ Hits 12266 12280 +14
- Misses 8082 8103 +21 ☔ View full report in Codecov by Sentry. |
7202f7f
to
c8e6612
Compare
…l source URL can be retained after a file is downloaded
c8e6612
to
ceb7c7b
Compare
This is a useful and reasonable change, I think. Thank you for the PR. I am currently going through it, add the missing translations and change some smaller things. Also, I think we should keep the media_url property in the serialized API output for backward compatibility (while removing its documentation, so that it is not used for newer software). That should be an easy addition. |
Since there is a tendency for online data to be lost it usually makes sense to generally download any external attachments. However, with the current configuration, the original link is lost, so there is no easy way to check e.g. if there was a change to the original file. Since I don't like throwing out data in bulk I needed a mechanism to retain both copies.
This PR splits the single "path" property into "internal_path" and "external_path" to achieve that. To keep the naming and handling of internal and external files consistent that spreads into quite a few files.
Sorry for the single huge commit, but there's really no in-between state where everything still works.
Some translations are required again. Since I still don't know how to do these I just added TODO tags. There's also some changes to the English translation file which would need to be propagated to the other languages.
I considered keeping the "media_url" key in the normalizer for compatibility, but it didn't work for external URLs in the first place, so I ended up just removing it.
Depends on PR #847