Attachment Improvements By Xon

Attachment Improvements By Xon 1.1.3

No permission to download
Also, without this addon, my attachments already have X-Frame-Options and X-Content-Type-Options.

Capture.webp


Should I add than
Code:
location ^~ /internal_data/ {
        add_header Etag $upstream_http_etag;
        add_header X-Frame-Options SAMEORIGIN;
        add_header X-Content-Type-Options nosniff;
        internal;
        allow 127.0.0.1;
        allow MY IP;
    }

or just

Code:
location ^~ /internal_data/ {
        add_header Etag $upstream_http_etag;
        internal;
        allow 127.0.0.1;
        allow MY IP;
    }
 
My forum is in webroot so internal_data folder exists within the webroot too.

Mine is the same, and I did not edit anything in library/config.php

The only thing I did was add this to the Nginx vhost config file for the website:

Code:
location ^~ /internal_data {
    internal;
    add_header Etag $upstream_http_etag;
    add_header X-Frame-Options SAMEORIGIN;
    add_header X-Content-Type-Options nosniff;
}
 
OK, Installed addon, set option to use Nginx X-Accel-Redirect Support.

Only edit my website nginx conf to (nginx restarted after editing):

Code:
location ^~ /internal_data/ {
        add_header Etag $upstream_http_etag;
        add_header X-Frame-Options SAMEORIGIN;
        add_header X-Content-Type-Options nosniff;
        internal;
        allow 127.0.0.1;
        allow MY IP;
    }

I can see attachments on my forum, no errors in ACP, but when I look at attachment info, nothing is changed, still same data:

Capture.webp

Am I did something wrong or this is as should be?
 
OK, Installed addon, set option to use Nginx X-Accel-Redirect Support.

Only edit my website nginx conf to (nginx restarted after editing):

Code:
location ^~ /internal_data/ {
        add_header Etag $upstream_http_etag;
        add_header X-Frame-Options SAMEORIGIN;
        add_header X-Content-Type-Options nosniff;
        internal;
        allow 127.0.0.1;
        allow MY IP;
    }

I can see attachments on my forum, no errors in ACP, but when I look at attachment info, nothing is changed, still same data:

View attachment 147694

Am I did something wrong or this is as should be?

Based on what Xon wrote here, I think that is as it should be.
 
Also, without this addon, my attachments already have X-Frame-Options and X-Content-Type-Options.

View attachment 147693


Should I add than
Code:
location ^~ /internal_data/ {
        add_header Etag $upstream_http_etag;
        add_header X-Frame-Options SAMEORIGIN;
        add_header X-Content-Type-Options nosniff;
        internal;
        allow 127.0.0.1;
        allow MY IP;
    }

or just

Code:
location ^~ /internal_data/ {
        add_header Etag $upstream_http_etag;
        internal;
        allow 127.0.0.1;
        allow MY IP;
    }
In my experience, nginx will strip these headers when internal redirection occurs. So you need to add them back on. The goal is to have identical set of headers from when this add-on is enabled vs disabled.
 
@Xon

you did not answer yet my question from April 2016.

I need the option to restrict kb AND pixel size per usergroup. Ideally combined with a weekly limit how many images they are allowed to upload from Monday to Sunday in specific forums.

Is there hope that you will implement this? See screenshot

restrictions_in_kb_and_pixel_per_usergroup.webp
 
This addon will not conflict with [Tinhte] Attach Image Optimization?
Or one is useless when both addons is active?

Thanks!
 
I now have:
Nginx X-Accel-Redirect Debug Options
But I do not even run NGINX.

A small issue: I dont think options should be placed higher than the default XF options. Board active should always be at the top.
 
I now have:
Nginx X-Accel-Redirect Debug Options
But I do not even run NGINX.

A small issue: I dont think options should be placed higher than the default XF options. Board active should always be at the top.
I don't think this addon works without NGINX.
 
Xon updated Attachment Improvements By Xon with a new update entry:

Feature Update

  • Image dialog functionality improvements.
    • Allows selecting recent (image) attachments.
    • Can upload attachments.
    • Respects upload/attach permissions.

attach-png.154953

Read the rest of this update entry...
 
@Xon great feature additions.

It seems like the "Existing Attachments" insert does not work though... When I click an image it shows JavaScript activity but nothing happens. No BB Code and not picture is written in the quick reply editor.
 
Last edited:
@Xon great feature additions.

It seems like the "Existing Attachments" insert does not work though... When I click an image it shows JavaScript activity mit nothing happens. No BB Code and not picture is written in the quick reply editor.
What editor are you using? This doesn't support TinyMCE editor (but it shouldn't show up).

It is possible there are some javascript errors (which show on console), so can you please PM me some details so I can look at how it is failing on your site?
 
What editor are you using? This doesn't support TinyMCE editor (but it shouldn't show up).
Using the standard XF Editor. But there are add-ons that modify it. Like the FontAwesome BBCode add-on from TH and the Attachment add-on from XenMade but deactivating these makes no difference. Clicking on the attachment does not do anything beside making the js "loading" animation start.

It is possible there are some javascript errors (which show on console), so can you please PM me some details so I can look at how it is failing on your site?
"Failed to load resource: the server responded with a status of 404 (HTTP/2.0 404)" for the first picture in the attachment listing but all others are displayed.
 
Can you explain what you mean by
use 'internal;' to secure the internal_data folder.

My .htaccess has
Code:
Order deny,allow
Deny from all

How would I change this to use internal? I'm not using Nginx.


At the moment, I can see existing attachments, but click on any of the existing attachments does not add them, it just looks like it's trying to load something then goes back to how it was.
fc1bd8f322f2fb1bb865f4e6055ca4b1.gif1
 
Can you explain what you mean by

My .htaccess has
Code:
Order deny,allow
Deny from all

How would I change this to use internal? I'm not using Nginx.
This feature is only usable with nginx.

At the moment, I can see existing attachments, but click on any of the existing attachments does not add them, it just looks like it's trying to load something then goes back to how it was.
fc1bd8f322f2fb1bb865f4e6055ca4b1.gif1
I'm looking into this issue.

What browser is this with?
 
Top Bottom