• Extensions
  • FriendsOfFlarum upload, the intelligent file attachment extension

JRay I did some work on it again today. There is progress, it's just not done yet.

    JRay thanks for your support, sometimes that's exactly a developer needs to push code to the finish line ?

    luceos changed the title to Flagrow upload, the intelligent file attachment extension .

    JRay and also @Puschie @limiter @san @sizonov_stas @bikepost

    I've just tagged 0.6.0-beta, which adds a feature I've been investing quite some time into.

    Templates

    Templates are how uploads are shown on your forum. Enforcing proxied downloads and the new image preview in 0.5.0 might have been a bad decision. In order to keep the new functionality intact, but still allow full screen image uploads, the new templates functionality allows you to configure how files are shown per mime type configuration.

    release notes

    • Added template functionality, allowing to configure per mime type / adapter how files are shown in your forum.
    • Vietnamese, Polish, Korean and Chinese translations are updated or added. Thanks to tdtgit, Rylat, Comocozy and BeefOnionDumplings.

    Previews in replies now also work due to this feature.

    Upgrade

    In order to upgrade from 0.5.0 or below, use Bazaar or manually:

    composer require flagrow/upload:0.6.* --prefer-dist --update-no-dev -o
    php flarum cache:clear
    rm assets/rev-manifest.json

    Make sure to create a backup of your database and files (assets) regularly.

    Downgrade

    As this version is tagged beta on purpose; in case you run into any issues revert the upgrade like so:

    composer require flagrow/upload:0.5.* --prefer-dist --update-no-dev -o
    php flarum cache:clear
    rm assets/rev-manifest.json

    Have fun

    I hope you all enjoy this release. If you do make sure to let us know and if possible support our efforts at patreon.com/flagrow ?

      luceos Thank you for this and for tagging me.

      • I am still experiencing this issue: flagrow/upload104
        I see it was closed but without explanation. Does it mean, you resolved it?

      • The update does not seem to work on images that have already been uploaded/ in existing threads.
        The image does not show in full/ big size and hovering gives the option to download, which I'd like to disable.

        bikepost

        • That one is fixed but not yet released. Will do so once 0.6.0-beta seems stable.
        • Old uploads indeed are not migrated to the templates functionality.

          luceos

          • okay
          • not only the existing images were not migrated but the update broke the existing images.
            Can we please migrate the images to the new templates?

            luceos I've just tagged 0.6.0-beta, which adds a feature I've been investing quite some time into.

            Templates are working great!

            But I'm not able to get uploads to work on mobile. Clicking the button doesn't do anything. Works fine on desktop.
            flagrow/upload109

            Hi

            When i upload a .mov file it changes to .qt
            Does anyone know how to keep the mov extension?

            Flagrow upload 0.6.0-beta
            Flarum Beta 7

            Mime type used: (video\/(3gpp|mp4|mpeg|quicktime|webm))

              Sinamics When i upload a .mov file it changes to .qt

              As a security measure the extension forces the extension it identifies. Thus preventing shady scripts from being uploaded as images. The drawback is what you describe.

              Your issue is related to: flagrow/upload99

              Upgrade went smooth, but I got an error when trying to upload anything:

              Fatal error: Call to undefined function Flagrow\Upload\Templates\preg_replace_callback_array() in .../flarum/vendor/flagrow/upload/src/Templates/AbstractTemplate.php on line 82

              It turns out, that preg_replace_callback_array() needs php7. Would it be possible, to use preg_replace_callback instead?

                luceos A possible workaround is shown in the comments of the php.net-page I linked to.

                8 days later

                Hi I would like to upload .phar file. I configured MIME type to "application/octet-stream". However when I upload phar file, it changes to .bin file automatically.

                Is this extension supports application/octet-stream ?
                If its supported, how can I fix this problem?

                15 days later

                I just integrated upload without any trouble except for my own user skills. Kind of bummed that video files needed to be downloaded and cannot be displayed directly.

                I also played with Amazon S3, which works and saw this piece of news on DigitalOcean's competing product:

                I'm happy to say that we have just announced Spaces Object Storage. It can definitely be used for storing images and other user uploaded files. It's fully compatible with the S3 API so it's a simple drop-in replacement!

                They seem to highlight that it might just be a matter of refactoring some parts of the extension and the league/flysystem-aws-s3-v3 package. Might be worth looking into. Just a heads up.

                Seems like a great extension. I tried it, but all images upload the same size and are way too cropped. Not sure why there's even a width cap in the settings.

                If you could just upload the image as it's intended, it would be awesome.