-
Notifications
You must be signed in to change notification settings - Fork 24
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
File actions for frontend #2214
Conversation
{revisionItem.name} | ||
</div> | ||
<div class="revision-attribute mime"> | ||
{revisionItem.mime_hint.split(";")[0]} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think MIMEs will always have a semicolon, and also, why can't we just show the whole MIME type to users?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I personally think the charset is kind of an unnecessary info, but we can go with showing the whole thing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My thinking is that people interested in MIME types are likely to be technical, and so then providing the whole string is more useful than not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am pretty sure there is a way to get a textual, more human-readable file type from a MIME. However I don't know if our current magic library provides it, nor what its internationalization status is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I just checked, the current crate we use, filemagic
, doesn't do this. So adding a "human-readable file description" will need to be an extension added later if that's what we do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wikidot provides the file type as a pretty rudimentary human readable string, for example it shows .png as "PNG image data" but .js as "No description"
Adds frontend UI for performing page file actions: