chore: use consistent relative paths for resources #2683
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
always store resources with a relative path with forward slashes, which will be transformed as needed when the file is accessed
fix an issue with thumbnail generation on Windows
add several validations for local storage setting
improve front-end error feedback when changing local storage
add migrations to make existing resource paths relative (not needed, as the back-end code allows mixed path styles, but improves database consistency)
This improves data portability by a lot.
Migration queries testing
There are some differences between the 3 DBMS, but they are covered and the results are consistent.
Standard Memos Docker installations will work just fine, and most edge cases are covered.
SQLite
https://extendsclass.com/sqlite-browser.html
MySQL
https://extendsclass.com/mysql-online.html
PostgreSQL
https://extendsclass.com/postgresql-online.html