Attachments thumbnails

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
Noke101
Posts: 41
Joined: Mon Aug 09, 2021 11:21 am

Attachments thumbnails

Post by Noke101 »

Script URL:
Version of script:
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:

Write your message below: Hello again, I wanted to ask if it is possible to make thumbnails and view without downloading (only images) in the attachment module, I think the preview for example word / excel files will be more difficult, I would like to preview images with thumbnails.
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Re: Attachments thumbnails

Post by Klemen »

It's currently not supported by Hesk. We will probably add it at one point in the future, but can't really say when.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
morphisto.zet
Posts: 27
Joined: Tue Jul 12, 2022 8:02 am

Re: Attachments thumbnails

Post by morphisto.zet »

Hey Noke101,

there is another posting with a sample-code, that pictures won't be downloaded anymore: viewtopic.php?p=28852#p28852 maybe it's kinda, what you're looking for.
Noke101
Posts: 41
Joined: Mon Aug 09, 2021 11:21 am

Re: Attachments thumbnails

Post by Noke101 »

morphisto.zet wrote: Thu Sep 08, 2022 1:11 pm Hey Noke101,

there is another posting with a sample-code, that pictures won't be downloaded anymore: viewtopic.php?p=28852#p28852 maybe it's kinda, what you're looking for.
I tried this, not exactly what I wanted, but it works without downloading, but opens the picture in a new tab. Many thanks!!
shddcit
Posts: 60
Joined: Wed Mar 30, 2022 3:54 pm

Re: Attachments thumbnails

Post by shddcit »

Good time of day.
Please tell me how in this code to open attachments on a new tab by clicking?
target = "_blank" does not want to do this, or I insert it in the wrong place.
Noke101
Posts: 41
Joined: Mon Aug 09, 2021 11:21 am

Re: Attachments thumbnails

Post by Noke101 »

shddcit wrote: Tue Sep 13, 2022 3:02 pm Good time of day.
Please tell me how in this code to open attachments on a new tab by clicking?
target = "_blank" does not want to do this, or I insert it in the wrong place.
Hi, i added target="_blank" in admin_ticket.php

I kept the ability to quickly download a file when clicking on the icon, and when clicking on the link it opens in a new tab, I changed the attachment icon accordingly.

Code: Select all

<a target="_blank" title="'.$hesklang['dnl'].' '.$att_name.'" href="../download_attachment.php?att_id='.$att_id.'&amp;track='.$trackingID.'">
            <svg class="icon icon-export" style="width: 16px; height: 16px; margin-right: 0px; vertical-align: text-bottom;">
                <use xlink :href="'. HESK_PATH .'img/sprite.svg#icon-export"></use>
            </svg>
        </a>
		<a target="_blank" class="underline" title="'.$hesklang['dnl'].' '.$att_name.'" href="../view_attachment.php?att_id='.$att_id.'&amp;track='.$trackingID.'">'.$att_name.'</a><br />
*If you copy this, don't forget the space between xlink :href
shddcit
Posts: 60
Joined: Wed Mar 30, 2022 3:54 pm

Re: Attachments thumbnails

Post by shddcit »

Thank you very much.
Your decision helped me a lot.
Noke101
Posts: 41
Joined: Mon Aug 09, 2021 11:21 am

Re: Attachments thumbnails

Post by Noke101 »

shddcit wrote: Tue Sep 27, 2022 5:03 pm Thank you very much.
Your decision helped me a lot.
You are welcome!
The only thing I want to add is that the use of target="_blank" is not recognized as valid in w3c.
There are some vulnerabilities that can be exploited if you use target="_blank".
I have not yet found any solution how to implement opening a new window without target="_blank".

Perhaps Klemen can tell us something, he has much more experience and knowledge in this scope than we have
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Re: Attachments thumbnails

Post by Klemen »

I don't know of any target="_blank" vulnerabilities and this is the same code used throughout the web, shouldn't be an issue.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Noke101
Posts: 41
Joined: Mon Aug 09, 2021 11:21 am

Re: Attachments thumbnails

Post by Noke101 »

Klemen wrote: Wed Sep 28, 2022 1:07 pm I don't know of any target="_blank" vulnerabilities and this is the same code used throughout the web, shouldn't be an issue.
When I tried to look for information about target="_blank", I came across a lot of sites that told about the vulnerability associated with this.

https://www.jitbit.com/alexblog/256-ta ... lity-ever/
morphisto.zet
Posts: 27
Joined: Tue Jul 12, 2022 8:02 am

Re: Attachments thumbnails

Post by morphisto.zet »

Noke101 wrote: Wed Sep 28, 2022 3:37 pm When I tried to look for information about target="_blank", I came across a lot of sites that told about the vulnerability associated with this.

https://www.jitbit.com/alexblog/256-ta ... lity-ever/
Didn't know about that. Thx. But: It's only interessing, if you're opening an external site and not one your responsible for... So there would be no vulnerability for you in this scenario.
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Re: Attachments thumbnails

Post by Klemen »

You can only exploit that if you own a malicious website that sends your users to malicious pages. It's not something someone can exploit on your website.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Noke101
Posts: 41
Joined: Mon Aug 09, 2021 11:21 am

Re: Attachments thumbnails

Post by Noke101 »

Klemen wrote: Wed Sep 28, 2022 4:12 pm You can only exploit that if you own a malicious website that sends your users to malicious pages. It's not something someone can exploit on your website.
Now it's clear. Thanks for the clarification.
Post Reply