• Extensions
  • FriendsOfFlarum upload, the intelligent file attachment extension

clarkwinkelmann

there is some terminology that i am not familiar with in the context of flarum

i don't know what a template is, if you are reffering to how I installed flarum, i just followed official instructions and added few extensions using composer

there is no need for migrating old images to new urls

url in config.php is configure as: 'url' => '//' . $SERVER['HTTP_HOST']

additional note: not being able to see images works both ways, in normal browser i can't see images post over the tor one

    hrvoje459 in the FriendsOfFlarum upload settings, next to each MIME type, there is a dropdown for how the file will be inserted in the post. That's what is called a "template" in this extension.

    Some of the templates have the URL inserted as a bbcode parameter in the post body. Other templates retrieve the file URL based on the file ID which is inserted in the post body. Theoretically the second one should be able to update depending on the canonical URL, but in practice I think in the second case it's just using the pre-computed URL stored in the files table so it also won't update.

    Officially neither Flarum nor this extension supports having multiple access URLs. There are probably solutions around this, like rewriting the URLs to be relative or using the TextFormatter extender to modify URLs on the fly as posts are retrieved, but they aren't built into the extension.

      adam42 Is there an extension that allows me to delete files entirely?

      I think my question got hidden behind the new discussion.

      clarkwinkelmann

      Thank you for your help,
      For future references, first two options ("Default file download template" and "Default image download template") serve their purpose, download is possbile both ways, two way previewing images is not possible with any template

      Not pursuing this further

      I want to check how it works before installing. Is there any demo site for this file attachement extenstion?

      6 days later

      Fealist I need to use this high-resolution original image. Is there any way to remove this restriction?

        1.0.7

        • Expose the current php.ini values for post_max_size and upload_max_size in extension settings

        image

        Updating
        composer require fof/upload:"*"
        php flarum cache:clear

        The download template is downloaded by PHP agent by default. After opening the anti-theft chain, it can't be downloaded. How can I solve it?

          allen13 can you describe your hosting in more details? You have software that blocks PHP downloading the file internally? Are you able to whitelist Flarum or the local IP so it can make requests without limits?

            clarkwinkelmann I used OSS to store files and started referer. Cannot download when using the default download template.

            How do I delete a file that I have uploaded, please?

              adam42 In the post editor, click on the My Media button (looks like a filmstrip and a photo), and all of your uploaded files are displayed, with a delete icon on the top right of each one.

              EDIT: Just realised you can also access My Media from your profile page.

                JohnP k Hi JohnP, I had checked that out, but the warning message says:

                Are you sure you want to hide "unity-statement-20210903.pdf"? Hiding a file will only remove it from your media manager and will not affect existing posts.

                I'm looking for a way to clear down unwanted files completely and free space. I assume just hiding them won't help.