For images we have a preview for use the preview link

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2017-09-21 11:47:05 +02:00
parent 7d8c5f73f5
commit 894958e3e2
No known key found for this signature in database
GPG Key ID: F941078878347C0C
2 changed files with 3 additions and 1 deletions

View File

@ -375,8 +375,10 @@ class ShareController extends Controller {
if ($shareTmpl['previewSupported']) {
$shareTmpl['previewImage'] = $this->urlGenerator->linkToRouteAbsolute( 'files_sharing.PublicPreview.getPreview',
['x' => 200, 'y' => 200, 'file' => $shareTmpl['directory_path'], 't' => $shareTmpl['dirToken']]);
$shareTmpl['previewURL'] = $this->urlGenerator->linkToRouteAbsolute('files_sharing.publicpreview.directLink', ['token' => $token]);
} else {
$shareTmpl['previewImage'] = $this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('core', 'favicon-fb.png'));
$shareTmpl['previewURL'] = $shareTmpl['downloadURL'];
}
// Load files we need

View File

@ -92,7 +92,7 @@ $maxUploadFilesize = min($upload_max_filesize, $post_max_size);
</div>
<div class="directLink">
<label for="directLink"><?php p($l->t('Direct link')) ?></label>
<input id="directLink" type="text" readonly value="<?php p($_['downloadURL']); ?>">
<input id="directLink" type="text" readonly value="<?php p($_['previewURL']); ?>">
</div>
<?php endif; ?>
</div>