Attachment Improvements By Xon

Attachment Improvements By Xon 2.6.1

No permission to download
Just installed and I'm excited to give it a spin.
I did notice one minor issue - in the settings, specifically phrase option.svAttachmentsStripExif, the phrase text says "Strip JEPG EXIF"
It's pretty easy to fix on my end and doesn't impact functionality but I thought I'd at least let you know.
 
It depends on the svg. Please ensure the svg-as-attachments is actually enabled as it was changed so it wasn't enabled by default.
 
It depends on the svg. Please ensure the svg-as-attachments is actually enabled as it was changed so it wasn't enabled by default.
what if we use external svgs? and and img atgs will it work then or not?
like external links with img tags, will the svgs load then?

also i9ve seen the svg i want to upload cancvles out and doesnt get uplaod but all others do
 
Hi @Xon
I've just installed this add-on as my site hosts some large files which some members have issues downloading due to time outs etc.
Regarding the resumable download option, do I need to do anything once installed? I've looked at the add-on settings and can't see anything.
 
So I just enabled Cloudflare's R2 to store all images and attachments in /data and /internal_data/attachments.

What should be added to the config.php file?

FAQ mentioned something related (I guess):

Bash:
$config['internalDataUrl'] = function($externalPath, $canonical)
{
    return 'internal_data_s3/https://xftest.ams3.digitaloceanspaces.com/internal_data/' . $externalPath;
};

and for nginx config file:

Bash:
location ~* /internal_data_s3/(.*?)://(.*?)/(.*) {
    internal;
    set $xfEtag $upstream_http_etag;
    set $download_protocol $1;
    set $download_host $2;
    set $download_path $3;
    set $download_url $download_protocol://$download_host/$download_path;

    resolver 127.0.0.1 ipv6=off;
    proxy_set_header Host $download_host;
    proxy_set_header Authorization '';
    proxy_set_header Cookie '';
    proxy_max_temp_file_size 0;
    proxy_intercept_errors on;
    error_page 301 302 307 = @handle_redirect;

    proxy_ssl_server_name on;
    proxy_pass $download_url$is_args$args;

    proxy_hide_header Content-Disposition;
    proxy_hide_header Content-Type;
    proxy_hide_header Etag;
    proxy_hide_header x-amz-request-id;

    add_header Etag $xfEtag;
    add_header X-Frame-Options SAMEORIGIN;
    add_header X-Content-Type-Options nosniff;
}

location @handle_redirect {
   resolver 127.0.0.1 ipv6=off;
   set $saved_redirect_location '$upstream_http_location';
   proxy_pass $saved_redirect_location;
}

What exactly should I put for R2?
 
@Xon
Installed this and find that it does not allow me to upload SVG as resource icon (my main objective in using this). It works fine upload svg to a post as attachment.
Oh, so close but so far.
Do you think you can extend it to work on resource icons?
 
Anyone can confirm this works for 2.2.15?
This works fine with all of XF2.2 branch version.

@Xon
Installed this and find that it does not allow me to upload SVG as resource icon (my main objective in using this). It works fine upload svg to a post as attachment.
Oh, so close but so far.
Do you think you can extend it to work on resource icons?
I'm not sure when I'll have time to work on this for free, as I'm in the middle of some large project work. Can you open a ticket on my site if you are interested in funding this feature, I think it should be reasonably quick.
 
Xon updated Attachment Improvements By Xon with a new update entry:

2.6.0 - Feature update

This addon is now available on https://atelieraphelion.com
  • Require StandardLib v1.18.0+
  • Fix typo 'Strip JPEG EXIF' option text
  • Fix "Allow inline display of SVG image attachments" option was not actually wired up as expected
  • Improve resizing of SVGs to avoid unexpected truncation
  • Improve handling of SVGs which might have been rejected due to formatting
  • Add "Only admins can upload SVGs as...

Read the rest of this update entry...
 
2.3.0. beta 2 bug: No user alert when trying to add more attachments than allowed in your permissions quota.
 
This add-on uses custom javascript, so it isn't likely to be updated until at least end of April or sometime in May.
 
Top Bottom