-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Set the proper filename for version downloads #17503
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
| if ($this->request->isUserAgent( | ||
| [ | ||
| Request::USER_AGENT_IE, | ||
| Request::USER_AGENT_ANDROID_MOBILE_CHROME, | ||
| Request::USER_AGENT_FREEBOX, | ||
| ])) { | ||
| $response->addHeader('Content-Disposition', 'attachment; filename="' . rawurlencode($filename) . '"'); | ||
| } else { | ||
| $response->addHeader('Content-Disposition', 'attachment; filename*=UTF-8\'\'' . rawurlencode($filename) | ||
| . '; filename="' . rawurlencode($filename) . '"'); | ||
| } |
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.
Do we do that magic for those user agents somewhere else as well? Or phrased differently: is there a piece of doc for the reasoning (in the source)?
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.
Yes we use it in another DAV plugin as well.
However as I want this backported to at least 17 I would like to have it as clean as possible ;)
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.
maybe at least a pointer to the source file/method where it is used (if there is more info...)?
Before it just used the internalid (timestamp often) which is not really user friendly. Signed-off-by: Roeland Jago Douma <[email protected]>
9cf0eb0 to
c1b8cb2
Compare
|
/backport to stable17 |
|
/backport to stable16 |
|
backport to stable17 in #17541 |
|
backport to stable16 in #17542 |
Before it just used the internalid (timestamp often) which is not really
user friendly.
This means that if the file is download the user has to manually rename it. Which is well. Not really user friendly.