• Extensions
  • FriendsOfFlarum upload, the intelligent file attachment extension

Ffuser1 Flarum Upload has no capability to show video by itself, so I assume you are using the "Just URL" template together with the AutoVideo feature in fof/formatting? That extension might come with some default CSS. Otherwise you can probably add your own CSS to customize the video player.

I'm trying to allow a custom file extension to be uploaded (.sq), and I can't manage to do so : Uploading files of this type is not allowed.. Here are my configuration for the extension :

Mime : (video\/(3gpp|mp4|mpeg|quicktime|webm))|(text\/(txt|sq))|(audio\/(aiff|midi|mpeg|mp4))|(image\/(gif|jpeg|png))|(application\/(x-(7z|rar|zip)-compressed|zip|arj|x-(bzip2|gzip|lha|stuffit|tar)|pdf)

User-provided file extensions: .sq

Should I try to create my own Mime type ? Or to go directly into the code to change that ?

Thanks a lot !

Suggestion:
Allow retrieving the direct link to a non image file, sometimes it is required for integration with other extensions. For example to embed a video using embed video you need to be able to link to the file. Of course once it's uploaded I can go and manually figure out the path, knowing the filename after upload and the date (directory), but it's manual work. That could even be an integration with the new media manager under the pending PR (get link from uploaded item?)... not sure the best way to accomplish this.

Also it would be nice if upload images were displayed in email notifications like externally linked images. I guess the markdown syntax is a bit different, so it does not get converted to HTML. This might have more to do with core, or even using the standard markdown for images with![](https://) rather than a proprietary one [upl-image-preview url=""] unless there is a specific reason for that.

    Anyone can quite easily introduce their own Template:

    • create a Template class similar to JustUrlTemplate based off the AbstractTemplate
    • register it using the util

    Upload is very extensible. But you do need to get your hands dirty by reading the actual code.

    ctml This might have more to do with core, or even using the standard markdown for images with![](https://) rather than a proprietary one [upl-image-preview url=""] unless there is a specific reason for that.

    That bbcode is not proprietary. It natively integrates into the textformatter library. I have no idea why the images aren't rendered inside email.

      luceos thanks, you are right - I completely missed that template.

      dyzdyz010 did you get this resolved? I have the same error thrown when uploading mp4 files.

      MIME Type: ^video\/mp4$

      [2021-02-26 19:45:05] flarum.ERROR: FoF\Upload\Exceptions\InvalidUploadException: No files were uploaded in /usr/share/nginx/flarum/vendor/fof/upload/src/Api/Controllers/UploadController.php:55

      Edit: works for small video files (e.g. 6 MB) but not a larger 90 MB file. Max size is set to 100000000 KB in the extension settings, and client_max_body_size is 100 MB. It's throwing a 500, if it were size or timeout related I should be seeing something else. So not sure if it's something on my end I can fix?

      13 days later

      IanM I have same issue after install 12.10 on flarum beta.15
      Error is :
      InvalidArgumentException
      Failed importing file due to No hint path defined for [fof-upload.templates].

      How can I solve?
      thanks
      vittorio

        vittorioeco this is caused by a different extension not being properly compatible with the latest Flarum version. You can try using the Extiverse Helper to try to find which one it could be, or try disabling other extensions until the issue stops.

          clarkwinkelmann
          I had already checked, I had no incompatible extensions. But now I have disabled all third party extensions minus fof / upgrade and then re-enabled them all one at a time. And now everything works. Perhaps the problem was the sequence of enabling the modules. However Flarum has become the best forum around.
          Thanks for your indication and congratulations to all those who have worked on it over the years.
          Vittorio

          Hello,
          I am having a little trouble with uploading text files, particularly .txt and .csv.
          My MIME types currently look like this:

          images, video, word, pdf, zips etc are all uploading fine, Just not .txt and .csv.
          Any ideas what I might be doing wrong?
          Thanks, Marc

            0.13.0

            Major new feature: Media Manager

            • Added responsive media manager
            • Simplified upload button in the composer
            • Added media manager button to the composer
            • Added /fof/uploads endpoint
            • Updated /fof/upload endpoint output
            • Updated FileSerializer
            • Added File frontend model
            • Access to media library from user profile (plus moderator permissions to access library of others)
            • Option to remove media from library (does not yet remove the file from disk or posts - coming soon)

            Modal features:
            The media manager is expandable minded. Other extensions could open the FileManagerModal modal component and attach custom params to customize their needs.

            The file manager is responsive, has drag & drop support and automatically selects the uploaded files. After clicking the 'Select files' button, the files will be added with their bbcode to the composer.

            Updated composer buttons

            image

            Automatically select uploaded files

            image

            Example: Restricted to file type image

            image

            Night mode

            image

            Mobile view

            image

            FriendsOfFlarum/upload262
            FriendsOfFlarum/upload271

            Updating
            composer require fof/upload:^0.13
            php flarum migrate
            php flarum cache:clear

            Thank you @JasperVriends for putting this together, and to @davwheat for helping me with the hiding feature!

            Note: this is currently beta.15 only, but will be updated for the upcoming release as soon as possible

              IanM woow, Perfect!!!

              Currently can user remove his her uploded files before?

                fakruzaruret Currently can user remove his her uploded files before?

                Any user can remove (hide from media manager) their own uploads. There is an additional permission to allow admins/mods/etc the permission to remove those of others

                0.13.1

                Whoopsies, we let a small error creep through in 0.13.0, but this fixes it!

                • Corrected Upload button tooltips to not show text containing false

                Update using:

                composer update fof/upload

                If you're already on 0.13.1, please double-check that this issue doesn't exist for you. If it does, follow these steps.

                marcfrompgs My original post may have got lost with the latest feature release news. Any help much appreciated. Thanks M