diff --git a/apps/files/js/files.js b/apps/files/js/files.js index fdaa3aa334..d5e8450f41 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -717,7 +717,7 @@ Files.lazyLoadPreview = function(path, mime, ready, width, height, etag) { console.warn('Files.lazyLoadPreview(): missing etag argument'); } - if ( $('#publicUploadButtonMock').length ) { + if ( $('#isPublic').length ) { urlSpec.t = $('#dirToken').val(); previewURL = OC.Router.generate('core_ajax_public_preview', urlSpec); } else {