-
-
Notifications
You must be signed in to change notification settings - Fork 35
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
PDF previews cannot be rendered in backend for secured files #224
Comments
There used to be a problem with the preview images that I thought was fixed. Are the previews shown correctly for other file types (PNG/JPG)? |
@balasch Yes. PNG/JPG thumbnails are shown properly, as you can see in the next screenshot. Also notice the "green person icon" is not attached to the picture as for the other PDF files: |
Too bad, then you can't just blame it on you and the server configuration. |
@balasch This happens to us in an nginx server, but also in a DDEV environment using nginx. Maybe you could just reproduce it there locally? This is our
We're using TYPO3 12.4.23 & |
DDEV config is great, thanks! |
@balasch Sorry, I noticed something, now re-checking all configuration. My So I guess it's an nginx problem all in all inside DDEV, as you mentioned? Here there are my EM global options for the extension, in case it helps:
|
We will check it. |
@balasch I also noticed this in EM Settings options in the Install Tool: So I guess I should read the docs again, to fix also this issue. |
Okay. Can you give me a feedback? |
@balasch Some feedback: I could add this nginx rule to the default
After restarting DDEV, Settings for the extension are shown properly: Files cannot be accessed in the frontend (403 error). Even with that, PDF thumbnails are not shown. All previes show in the console a 404 error e.g. Just to mention it, I upgraded extension locally to latest 6.1.1 version :) |
With ddev's default nginx configuration, all images will be tried to be delivered immediately, even if they don't exist. So the given URL will never get processed by TYPO3. If you change the following section in .ddev/nginx_full/nginx-site.conf # Media: images, icons, video, audio, HTC
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|webp|htc)$ {
expires 1M;
access_log off;
add_header Cache-Control "public";
} to # Media: images, icons, video, audio, HTC
location ~ ^(?:fileadmin/|uploads/|_assets/|sdl/).+\.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|webp|htc)$ {
expires 1M;
access_log off;
add_header Cache-Control "public";
} things should work as expected. Unfortunately, I did not manage to only exclude images from securedl/ from being processed directly. So if you have an idea how to achieve that, it would be great if you share it. |
TYPO3 12.4.23
EXT:secure_downloads 6.1.0
We experience that PDFs uploaded to a secured folder cannot generate PDF previews in the backend like in other not secured folders, using Filelist BE module:
"ADMIN TOOLS > Environment > Image Processing" section shows the ability to Read PDFs properly.
Is this a bug from the extension? Or is there anything we should additionally do through some web server configuration? (we're using nginx)
The text was updated successfully, but these errors were encountered: