We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27285
    • 29 Posts
    MOD NOTE: This thread was originally in the Repository support thread for FileDownload. As this tangented into getting someone else to extend the snippet beyond the original remit, it has been moved here to Wishlist.

    Hi!

    Is it possible to change the download path to an external webspace?
    E.g. my "www.modx-domain.com" calls the snippet including a folder from "www.my-file-domain.com/folder" to select the download files.

    Thx & Regards,
    Simon
      • 15987
      • 786 Posts
      That would require some changes in the code. It currently uses the modx path to get the start for the directory listing.
        • 27285
        • 29 Posts
        Is much code to change if directory listing is not required?
          • 15987
          • 786 Posts
          I didn’t mean the directory listing. I have not tried using an external url and am not sure it would work. atm, I don’t have time to try this, if you want to give it a shot it probably would not require to many code changes.
            • 27226
            • 186 Posts
            I argue that when the "my-file-domain" resides on a different server it will *not* work. All the directory commands the snippets uses can only access the local (i.e. server’s) filesystem.
            So, if it’s just a different URL, not a different server, the modifications are not so hard to do. But otherwise...
              • 27285
              • 29 Posts
              Yes, the file-system residents on a different server! Is there another possibility to get it working (by using another snippet)?
              • Yes, using the PHP ftp functions.

                http://il2.php.net/ftp
                  Studying MODX in the desert - http://sottwell.com
                  Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                  Join the Slack Community - http://modx.org
                  • 27285
                  • 29 Posts
                  Quote from: sottwell at Aug 07, 2006, 09:31 AM

                  Yes, using the PHP ftp functions.

                  http://il2.php.net/ftp

                  Mhhh.... Thanks for your reply!

                  It seems to be more difficult than I though...

                  The FileDownload snippet has all features I need, but I moved my filestorage to another domain and now I´m looking for a possibility to get it working... It needs to work with the group-permissions and don´t need to work with features like directory listing etc...

                  No existing snippet or easy way to modify FileDownload?
                    • 27285
                    • 29 Posts
                    Me again wink


                    Is this easy and possible:

                    - change the file-root (assets/files to ftp:www.myfiles.com) and use the php ftp-function to get the files from the other server?

                    Sorry, I´m no coder...
                      • 22815
                      • 1,097 Posts
                      Quote from: simon79 at Aug 09, 2006, 08:02 AM

                      The FileDownload snippet has all features I need, but I moved my filestorage to another domain and now I´m looking for a possibility to get it working... It needs to work with the group-permissions and don´t need to work with features like directory listing etc...

                      No existing snippet or easy way to modify FileDownload?

                      Without the directory listing, what exactly would it do? Directory is another word for folder.
                      And how will group permissions work cross-domain?

                      I think you are barking up the wrong tree entirely. Just because a snippet is called FileDownload does not mean it can be easily adapted to download files from anywhere.

                      Is there any particular reason that you can’t run FileDownload (or similar) on the actual box with the files on it?

                      Why did you move your filestorage?
                        No, I don't know what OpenGeek's saying half the time either.
                        MODx Documentation: The Wiki | My Wiki contributions | Main MODx Documentation
                        Forum: Where to post threads about add-ons | Forum Rules
                        Like MODx? donate (and/or share your resources)
                        Like me? See my Amazon wishlist
                        MODx "Most Promising CMS" - so appropriate!