• Extensions
  • FriendsOfFlarum upload, the intelligent file attachment extension

The extension includes database columns to store the discussion or post relation, but this was never implemented, I those columns are always null.

There is this existing issue about it FriendsOfFlarum/upload154

    • [deleted]

    clarkwinkelmann @luceos so in theory, it can be added ? I think this makes sense. Surely, if you intend to delete the post, you'd want the uploaded files gone too ?

      [deleted] of course, in theory this can be added. But there's a lot of work remaining. Also all existing files will be orphans unless we write some system to parse back in time.

      I'm not sure all platforms immediately delete files? For example Discord uploads can easily be used outside of Discord and I think they are not deleted imediately if you delete the post?

      The biggest challenge is when adding files to a new discussion or post, because we need some way of temporarily having the file without relationship, then link them together when posted. Right now Upload does nothing to validate that the files you have in the post content were uploaded during the edit of that post. You could easily link other files already uploaded, and we'd need to decide what to do with those as well.

        • [deleted]

        clarkwinkelmann Good comments. I understand completely. It's a nice to have rather than essential at this stage. I could simply remove the file in question manually.

        I'm having a problem. I'm migrating my Flarum and trying to install fof/upload gives me this:

        Using version ^0.10.0 for fof/upload
        ./composer.json has been updated
        Loading composer repositories with package information
        Updating dependencies (including require-dev)
        Your requirements could not be resolved to an installable set of packages.
        
          Problem 1
            - Installation request for fof/upload ^0.10.0 -> satisfiable by fof/upload[0.10.0].
            - fof/upload 0.10.0 requires guzzlehttp/guzzle ^6.0 -> satisfiable by guzzlehttp/guzzle[6.0.0, 6.0.1, 6.0.2, 6.1.0, 6.1.1, 6.2.0, 6.2.1, 6.2.2, 6.2.3, 6.3.0, 6.3.1, 6.3.2, 6.3.3, 6.4.0, 6.4.1, 6.5.0, 6.5.1, 6.5.2, 6.5.3, 6.5.4, 6.5.5, 6.5.x-dev] but these conflict with your requirements or minimum-stability.
        
        
        Installation failed, reverting ./composer.json to its original content.

        I have a similar problem with push notifications. I can't install fof/upload:0.8.2 (which doesn't have the dependency) because it doesn't work on Flarum v0.1.0-beta.13

        I've reinstalled everything now and it seems to install normally, but not when I migrate. Is there some sort of a bug when copying over assets?

          Yalfoosh do you have a line about guzzlehttp/guzzle in your composer.json? Can you maybe share the output of composer why guzzlehttp/guzzle ?

          What do you mean with the migrate issue? If you're coming from the Flagrow version, make sure you follow the update instructions. If you have an error message, please share it.

            clarkwinkelmann do you have a line about guzzlehttp/guzzle in your composer.json?

            Nope

            clarkwinkelmann Can you maybe share the output of composer why guzzlehttp/guzzle ?

            I have since fixed this, but these extensions don't even install it. It shouldn't ever be installed. By the way, I think it's because the guzzle that's packed with flarum is ^7.0. fof/upload wants ^6.0. This conflict shouldn't happen at all, it should work just fine! And it does usually.

            And after a full reinstall (well, for the 3rd time) it does work. But I reproduced it on the 2nd reinstall and am suspecting it has something to do with the order of my installs.

            clarkwinkelmann What do you mean with the migrate issue? If you're coming from the Flagrow version, make sure you follow the update instructions. If you have an error message, please share it.

            I'm migrating my forum from 1 machine to another. Basically, upload can be installed on vanilla flarum, as expected. But it failed on me when I tried to do

            composer require askvortsov/flarum-copy-links \
                             askvortsov/flarum-discussion-templates \
                             clarkwinkelmann/flarum-ext-circle-groups \
                             clarkwinkelmann/flarum-ext-emojionearea \
                             clarkwinkelmann/flarum-ext-group-invitation \
                             clarkwinkelmann/flarum-ext-who-read \
                             dem13n/nickname-changer \
                             fof/byobu \
                             fof/drafts \
                             fof/follow-tags \
                             fof/formatting \
                             fof/forum-statistics-widget \
                             fof/gamification \
                             fof/ignore-users \
                             fof/linguist \
                             fof/links \
                             fof/merge-discussions \
                             fof/polls \
                             fof/profile-image-crop \
                             fof/reactions \
                             fof/realtimedate \
                             fof/share-social \
                             fof/split \
                             fof/terms \
                             fof/upload \
                             fof/user-directory \
                             itnt/flarum-backtop \
                             noriods/auto-more \
                             reflar/cookie-consent \
                             studosi/lang-croatian \
                             studosi/mail-filter \
                             the-turk/flarum-edit-notifications \
                             the-turk/flarum-ext-fancybox \
                             the-turk/flarum-mathren \
                             zerosonesfun/flarum-ext-sm2

            I'm unsure if it has to do with the ordering, but I'm too tired to reproduce it now that I've finally got my forum migrated. Also, I've followed this tutorial with a few modifications (public folder instead of assets, ex.). I might try tomorrow because I still didn't get the new gamification working.

              Yalfoosh maybe it forces installation of guzzle 6 because of the php version, which one do you use?

                luceos I use PHP 7.4.9. Basically I just installed PHP 7.4 and it probably gave me the latest version.

                Anyways, tried to reproduce it, but couldn't do it. I tried it locally, as well as on my test server. I began thinking about what I did differently. One thing I remember is that between these two installs I installed unzip (sudo apt install unzip). This is because I was zipping my backup, which I was going to transfer, and so I needed to unzip it. Perhaps it's related to that.

                Strange bug overall. Whoever encounters it I guess a full reinstall (delete flarum folder, reset DB) will do the trick.

                OMG, I cant upgrade flagrow to fof.
                But the composer tell me

                Your requirements could not be resolved to an installable set of packages.

                My php version is 7.3.18, so what wrong with it?

                  scvoet please copy the full output from Composer with the conflicts.

                  You can also run composer why-not fof/upload to get only the relevant messages.

                    clarkwinkelmann

                    [root@localhost www]# composer require fof/upload
                    Do not run Composer as root/super user! See https://getcomposer.org/root for details
                    Using version ^0.10.0 for fof/upload
                    ./composer.json has been updated
                    Loading composer repositories with package information
                    Updating dependencies (including require-dev)
                    Your requirements could not be resolved to an installable set of packages.
                      Problem 1
                        - Installation request for fof/upload ^0.10.0 -> satisfiable by fof/upload[0.10.0].
                        - Conclusion: remove guzzlehttp/guzzle 7.0.1
                        - Conclusion: don't install guzzlehttp/guzzle 7.0.1
                        - fof/upload 0.10.0 requires guzzlehttp/guzzle ^6.0 -> satisfiable by guzzlehttp/guzzle[6.0.0, 
                    6.0.1, 6.0.2, 6.1.0, 6.1.1, 6.2.0, 6.2.1, 6.2.2, 6.2.3, 6.3.0, 6.3.1, 6.3.2, 6.3.3, 6.4.0, 6.4.1, 6
                    .5.0, 6.5.1, 6.5.2, 6.5.3, 6.5.4, 6.5.5].
                        - Can only install one of: guzzlehttp/guzzle[6.0.0, 7.0.1].
                        - Can only install one of: guzzlehttp/guzzle[6.0.1, 7.0.1].
                        - Can only install one of: guzzlehttp/guzzle[6.0.2, 7.0.1].
                        - Can only install one of: guzzlehttp/guzzle[6.1.0, 7.0.1].
                        - Can only install one of: guzzlehttp/guzzle[6.1.1, 7.0.1].
                        - Can only install one of: guzzlehttp/guzzle[6.2.0, 7.0.1].
                        - Can only install one of: guzzlehttp/guzzle[6.2.1, 7.0.1].
                        - Can only install one of: guzzlehttp/guzzle[6.2.2, 7.0.1].
                        - Can only install one of: guzzlehttp/guzzle[6.2.3, 7.0.1].
                        - Can only install one of: guzzlehttp/guzzle[6.3.0, 7.0.1].
                        - Can only install one of: guzzlehttp/guzzle[6.3.1, 7.0.1].
                        - Can only install one of: guzzlehttp/guzzle[6.3.2, 7.0.1].
                        - Can only install one of: guzzlehttp/guzzle[6.3.3, 7.0.1].
                        - Can only install one of: guzzlehttp/guzzle[6.4.0, 7.0.1].
                        - Can only install one of: guzzlehttp/guzzle[6.4.1, 7.0.1].
                        - Can only install one of: guzzlehttp/guzzle[6.5.0, 7.0.1].
                        - Can only install one of: guzzlehttp/guzzle[6.5.1, 7.0.1].
                        - Can only install one of: guzzlehttp/guzzle[6.5.2, 7.0.1].
                        - Can only install one of: guzzlehttp/guzzle[6.5.3, 7.0.1].
                        - Can only install one of: guzzlehttp/guzzle[6.5.4, 7.0.1].
                        - Can only install one of: guzzlehttp/guzzle[6.5.5, 7.0.1].
                        - Installation request for guzzlehttp/guzzle (locked at 7.0.1) -> satisfiable by guzzlehttp/guz
                    zle[7.0.1].
                    Installation failed, reverting ./composer.json to its original content.
                    [root@localhost www]# composer why-not fof/upload
                    Do not run Composer as root/super user! See https://getcomposer.org/root for details
                                                                           
                      [InvalidArgumentException]                           
                      Could not find package "fof/upload" in your project  
                                                                           
                    prohibits [-r|--recursive] [-t|--tree] [--] <package> [<constraint>]

                    i dont know how to fix it

                      Hi everyone! How to add .docx and .xlsx to this Mimetype ?
                      (video\/(3gpp|mp4|mpeg|quicktime|webm))|(audio\/(aiff|midi|mpeg|mp4))|(image\/(gif|jpeg|png))|(application\/(x-(7z|rar|zip)-compressed|zip|arj|x-(bzip2|gzip|lha|stuffit|tar)|pdf))

                      # composer require league/flysystem-aws-s3-v3
                      Do not run Composer as root/super user! See https://getcomposer.org/root for details
                      Using version ^1.0 for league/flysystem-aws-s3-v3
                      ./composer.json has been updated
                      Loading composer repositories with package information
                      Updating dependencies (including require-dev)
                      Killed

                      http://prntscr.com/u07g5a : The bucket policy also writes a warning. https://docs.aws.amazon.com/AmazonS3/latest/user-guide/add-bucket-policy.html i looked at this link. I tried it with the resource you have thrown. gave an access error warning.

                      http://prntscr.com/u07gg2 : How do I fill in the information here?