feat(cloudstorage/webdav): Show 'file size' property in WebDAV#13371
Merged
Conversation
Member
Contributor
Author
Member
|
I think it's redundant in the dialog. |
Contributor
Author
…d in item popup dialog
Contributor
|
I vote for having it in the dialog as well - as a reminder right before you hit Download button |
Member
|
I don't mind. Separate lines for filesize looks better for me. |
…e instead in item popup dialog" This reverts commit b28e618.
Contributor
Author
|
I've reverted the last commit so now it's back to the file size being on its own line, see #13371 (comment). |
hius07
reviewed
Mar 11, 2025
| text = item_name, | ||
| url = item_path, | ||
| type = "file", | ||
| filesize = item_filesize |
Member
There was a problem hiding this comment.
tonumber is okay with nil, you can get rid of item_filesize
filesize = tonumber(item_content_length_match),
hius07
approved these changes
Mar 11, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.





This PR adds a 'file size' property to the item dialog when selecting an item using Webdav Cloudstorage (see picture).
1) I sadly don't have an FTP/Dropbox/etc. setup to test/implement the other providers, so if someone else could at least make sure it does not cause crashes/other issues I would appreciate it, although the new field should not really affect these providers.
2) I was not sure what to show if the file size can't be queried (also not entirely sure when this would even be the case) so I'm just showing "N/A". If this causes problems with translations I'm happy to adjust it.
Default menu when file size is available:

Forcing the 'item.filesize' to be nil to display 'N/A':

This change is