fix: 🐛 Update pdf save to use correct dav path and credentials#1414
fix: 🐛 Update pdf save to use correct dav path and credentials#1414
Conversation
Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
| } | ||
|
|
||
| return `/files/${getCurrentUser()?.uid}` | ||
| return davUrl + `/files/${getCurrentUser()?.uid}` |
There was a problem hiding this comment.
This should throw if this ever happens. Because otherwise it would silently resolve to /files/undefined and hide the error.
| return davUrl + `/files/${getCurrentUser()?.uid}` | |
| return davUrl + `/files/${getCurrentUser().uid}` |
Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
|
@susnux Is this ok now? |
danxuliu
left a comment
There was a problem hiding this comment.
Thanks for the fix! I still need to do a proper review, but a couple of points :-)
- When addressing a review and fixing an issue in the original commits please use a
fixupcommit instead and squash the commits once the review is approved. In some cases you might need to rebase and amend the original commit if there are conflicts with later commits or you need to adjust the commit description, but at least in this specific pull request afixupcommit would be fine. Of course you can always squash the commits even if they were not originally created as fixup commits. - Please do not merge the latest main branch into the pull request, but rebase the commits on the latest main branch instead.
Independently of that, once the reviews are approved and the commits squashed in the PDF viewer app you will still need to build the JavaScript files. You can do that by writing a comment in GitHub with /compile /, which will trigger the compile bot and automatically add the needed files in its own commit.
If you use /compile amend / it will amend the last commit instead, but it is better to use /compile / and add the changes in its own commit to ease backports (which can be done also with GitHub comments like /backport to stable32 or, if you want that our future bot overlords see that you were already polite to them back in the day, /backport to stable32 please).
Ah, cool, thanks for the pointers, I'll be sure to do that |
The dav path is legacy when saving a pdf. This becomes an issue with password protected public shares.
We need to provide the request token for public
for user shares, we supply the current user id - the auth etc happens server side via session
To test this change
Place a pdf into a folder. Make this folder public, but password protected and editable.
@icewind1991 was instrumental in pointing me in the right direction:)