1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Attachment Improvements By Xon 1.0.3

A collection of improvements to XF's attachment system

  1. Xon

    Xon Well-Known Member

    Xon submitted a new resource:

    Attachment Improvements By Xon - A collection of improvements to XF's attachment system

    Read more about this resource...
     
    Luis likes this.
  2. Xon

    Xon Well-Known Member

  3. silence

    silence Well-Known Member

    Are there side effects of uninstalling the addon after usage?
     
  4. Xon

    Xon Well-Known Member

    No., it will revert to standard XenForo behaviour if this add-on is disabled or uninstalled.

    But oops, I forgot to make it delete the permissions it leaves behind :p I'll fix that tomorrow.
     
    silence likes this.
  5. BobbyWibowo

    BobbyWibowo Well-Known Member

    When you upload a new SVG file and then embed it to the post as a thumbnail, it'll appear as full instead of thumbnail on the editor, but will display correctly as a thumbnail after you post it. Was that intentional?
     
  6. Xon

    Xon Well-Known Member

    That sounds like a bug, but it is a while since I've touched the SVG attachment aspect. I'll need to have a look at it again.
     
  7. BobbyWibowo

    BobbyWibowo Well-Known Member

    My members aren't particularly using SVG files, so there have been no issue. I simply happened to encounter that issue while I was testing out things after I switched to this add-on from the nginx-accel only one.
     
    Xon likes this.
  8. Xon

    Xon Well-Known Member

    Looking into this more, and the entire thumbnail handling is broken. I've got a fix just under going testing and should be released in a day or two.

    Next version will support thumbnail rebuilding and on install will kick off a rebuild of any SVG attachments.
     
    BobbyWibowo likes this.
  9. Xon

    Xon Well-Known Member

    Xon updated Attachment Improvements By Xon with a new update entry:

    Bugfix release

    Read the rest of this update entry...
     
  10. BobbyWibowo

    BobbyWibowo Well-Known Member

    @Xon Got error after uploading an SVG file:
    Code:
    ErrorException: Fatal Error: Call to undefined method AttachmentViewer_XenForo_Model_Attachment::extractDimensionsForSVG() -library/SV/AttachmentImprovements/Deferred/SVGAttachmentThumb.php:35
     
    Last edited: Feb 10, 2016
  11. Axel B

    Axel B Well-Known Member

    Hi m8,
    I use the previous addon for SVG attachments. My website doesn't run on NGINX. Can I still use this addon?
     
  12. BobbyWibowo

    BobbyWibowo Well-Known Member

    @Axel B I'm pretty sure you can. You only need an nginx server if you want to enable the nginx-accel feature thing, which is actually disabled by default. Since it's disabled by default, I assume it's so that non-nginx users can use the other features.
     
    Axel B and Xon like this.
  13. Xon

    Xon Well-Known Member

    The nginx-only parts are disabled by default.

    Did you by any chance have the add-on disabled when installed? Or switch it to disabled after installing?

    This error happens when the deferred task runs but the add-on isn't enabled. I'll add some detection code so the deferred task exits out earlier rather than errors.
     
    Axel B likes this.
  14. Axel B

    Axel B Well-Known Member

    Thanks for the confirmation guys :)
     
  15. BobbyWibowo

    BobbyWibowo Well-Known Member

    @Xon For some reason, SVG is still not being treated as an image. Whenever I upload a new SVG file, it'll be treated as a normal file, so there's no option to add thumbnail o_O
    This is the SVG file that I tried to upload: https://upload.wikimedia.org/wikipedia/en/a/a4/Flag_of_the_United_States.svg
    Also tried another one (UK flag), didn't work as well. There's no error on the error log by the way.
     
  16. Xon

    Xon Well-Known Member

    How it extracts the width/height is a bit fragile, I'll need to-do some tweaking.

    :edit: Figured it out, I'm scanning the SVG for known-bad tags (such as <use xlink:href="..." />which can pull in external resources) and it is tripping over an internal reference which should be allowed.
     
    Last edited: Feb 10, 2016
    BobbyWibowo likes this.
  17. Xon

    Xon Well-Known Member

    @BobbyWibowo after re-reading the SVG spec and some security presentations; removing the 'use' statement from the "Bad SVG tags" should be safe. Especially as the SVG file is being loading as an image which browser use to enforce a number of restrictions.

    I'll soon release a version which gives an error message when an SVG is rejected.
     
    Last edited: Feb 10, 2016
    BobbyWibowo likes this.
  18. BobbyWibowo

    BobbyWibowo Well-Known Member

    @Xon Alright, thanks!
     
    Xon likes this.
  19. Xon

    Xon Well-Known Member

    Xon updated Attachment Improvements By Xon with a new update entry:

    Maintenance update

    Read the rest of this update entry...
     
    kontrabass and BobbyWibowo like this.
  20. kontrabass

    kontrabass Well-Known Member

    Hi Xon!, found this addon whilst looking for SVG support, and it is working great! Thanks!

    Regarding the X-Accel-Redirect functionality: am I correct in guessing that this would have the effect of freeing up resources of the webserver? I'm just a bit confused as to what the benefit actually is. And then to implement, we would just copy your 'location' directive suggestion for 'internal data in webroot', to our nginx vhost config file?

    We have a ton of attachments and are running the latest nginx.

    Thanks!!
     

Share This Page