• Extensions
  • FriendsOfFlarum upload, the intelligent file attachment extension

clarkwinkelmann Today I have seen my issue has been resolved, it is working normally as aspected well regarding your question I have entered the following value for CDN URL
Content Delivery URL (prefixes files): /assets/files
Till yesterday the URL of the uploaded images was :
[upl-image-preview url=/assets/files/assets/files/2020-08-30/1598821057-530685-english.png],
but today I find the uploaded images are using
[upl-image-preview url=/assets/files/2020-08-30/1598821057-530685-english.png]
In both situations the URL has not used or reflecting the protocol or domain name in front, i.e., it is using a path without a domain name...

    s1-ranjan in Content Delivery URL (prefixes files) you're supposed to enter something like https://my-special-other-subdomain.domain.tld. FoF Upload will then build a URL by adding /assets/files/filename.ext after the provided value.

    The value should be a fully qualified domain name. Using relative paths might work but that's not the intended usage.

      clarkwinkelmann I am not able to figure out what should be the root folder for this new subdomain, as of now the public folder is been used as the root folder of the main domain, and the location of the assets folder is in the public folder, hence should the very same public folder be used as the root folder for the subdomain, if that'll be the situation then it's most likely the website can be served from two different URL i.e., one from the main domain and other from the subdomain.

      4 days later

      userb you will have to inquire to Imgur if you have questions about their terms of use.

      This extensions uses Imgur's default API, and I think you can use either a free or pro API key with it.

      If you want to send files to an unsupported endpoint, you could create your own adapter and connect it via the local extend.php. This will require a bit of digging since we're lacking documentation on how to create additional adapters, but the code was made to accept customer-provided adapters.

        clarkwinkelmann if possible than I suggest putting a notice? I'm also not sure whether the img is deleted on imgur side if the post is deleted or a client id is banned.

          userb at this time FoF Upload does not delete any picture, in any adapter. Including local.

          What is the notice you suggest adding?

            clarkwinkelmann whatever you find appropriate to the affect the api is using a noncommercial api and maybe a link to imgur below the imgur image storage settings. just want to notice imgur commercial usage requires using a different api with additional headers so it is not a matter of just registering for commercial usage.

            I want to change the auto syntax of Imgur image from
            [upl-image-preview url=//i.imgur.com/ABCDEF.png]

            to

            ![](https://i.imgur.com/ABCDEF.png) or [img]https://i.imgur.com/ABCDEF.png[/img] and such.

            is it possible ?

              6 days later

              To use Imgur's API commercially, you must first register your application. Once that's done, you must register with RapidAPI. RapidAPI allows you to choose a pricing plan that fits your needs. From then on, the API endpoint is https://imgur-apiv3.p.rapidapi.com/ which must be used in replace of https://api.imgur.com/. Additionally, you must set a X-Mashape-Key request header with the key obtained from Mashape.

              Please tell me where to change these parameters so as not to disrupt the extension?

                MuhammadArslan do you mean it's working now, or do you still see the error after following the linked thread? Check out the browser javascript console for the javascript error that's probably occurring. You might also want to check the <flarum>/storage/logs folder for any relevant error message.

                Aleram it's not a feature we offer at this point. You'll have to fork the extension or register your own adapter from another extension.

                  clarkwinkelmann sorry it was working after the link thread but I figured out the problem and it has something to do with Shout extension. After installing it, enabling it, clearing flarum cache, site crashes. I have to uninstall shout to get site to work.

                  14 days later
                  5 days later

                  Hello there, thanks for extension first, work very well. How i can set the default file download template into [login] [/login] ? When i do that i get the template like a url and its not clickable. thanks.

                    Xkyer can you describe in more details what you are attempting? Are you creating a custom template via our PHP extension API described on the wiki? Is [login] a tag provided by another extension?

                    Or do you mean you use Upload's native syntax inside of a block added by another extension? Blocks can only be nested inside one another if the wrapper one has been tagged as such by the developer. If so, who developed that [login] code? The source code of that extension should easily tell whether they allowed to nest blocks inside of it.

                      clarkwinkelmann sir, i use Login to See extension and fof Upload. Both extensions work fine and when i try to hide a something for my guest visitors i get this one.

                      before:

                      after useing [login] [/login] form from Login to see extension

                        Xkyer do you mean Login2See Plus? https://discuss.flarum.org/d/24193-login-2-see-plus It doesn't seem to have a [login] tag.

                        The original Login2See https://discuss.flarum.org/d/5168-login2see is no longer supported by the author. Seeing the change for compatibility would most likely need to be done in Login2See, the only solution would be for you to fork the abandoned extension and make the required changes.

                        Yes sir i mean Login2See the simple one not the Plus. I can't fix the extension myself, i am newbie. I just will remove upload extension and try to upload files to some file shareing hosting and just hide with the login2see the url or button. Nvm thank you and sorry for taking ur time. I see you have very nice portfolio keep doing this.

                        peace