Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
die_coolen_jungs
our_own_cloud_project
Commits
3e499d1a
Commit
3e499d1a
authored
Oct 21, 2014
by
Lukas Reschke
Browse files
Merge pull request #11675 from owncloud/urlencode-for-special-characters
URLEncode filenames to be compatible with special characters
parents
8485743e
f451ecb8
Changes
1
Hide whitespace changes
Inline
Side-by-side
apps/files/controller/apicontroller.php
View file @
3e499d1a
...
...
@@ -32,7 +32,7 @@ class ApiController extends Controller {
*
* @param int $x
* @param int $y
* @param string $file
* @param string $file
URL-encoded filename
* @return JSONResponse|DownloadResponse
*/
public
function
getThumbnail
(
$x
,
$y
,
$file
)
{
...
...
@@ -41,9 +41,9 @@ class ApiController extends Controller {
}
try
{
$preview
=
new
Preview
(
''
,
'files'
,
$file
,
$x
,
$y
,
true
);
$preview
=
new
Preview
(
''
,
'files'
,
urldecode
(
$file
)
,
$x
,
$y
,
true
);
echo
(
$preview
->
showPreview
(
'image/png'
));
return
new
DownloadResponse
(
$file
.
'.png'
,
'image/png'
);
return
new
DownloadResponse
(
urldecode
(
$file
)
.
'.png'
,
'image/png'
);
}
catch
(
\
Exception
$e
)
{
return
new
JSONResponse
(
'File not found.'
,
Http
::
STATUS_NOT_FOUND
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment