We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 12151
    • 115 Posts
    Quote from: lokust at Mar 07, 2007, 10:50 AM

    If I right click on the file and save link as: I get the entire html code of the page saved in jpg format :0

    hi there i had the same problem until i changed the rewrite rule in my .htaccess file to:

    RewriteRule ^([^/]*)/?(.*)$ index.php?q=$1&d=$2 [L,QSA]

    This is specified in the FileDownloadPlugin docs

    Hope this helps?
      • 15987
      • 786 Posts
      It currently looks at the webuser group for determining the delete permissions.

      I will add this to the list of upgrades
        • 17412
        • 270 Posts
        Thanks Highlander.
        This is the same rewrite rule that I already have as specified in the documentation.

        Even with: RewriteRule ^([^/]*)/?(.*)$ index.php?q=$1&d=$2 [L,QSA] the files still don’t download. huh

          • 27376
          • 576 Posts
          Quote from: lokust at Mar 08, 2007, 10:15 AM

          Thanks Highlander.
          This is the same rewrite rule that I already have as specified in the documentation.

          Even with: RewriteRule ^([^/]*)/?(.*)$ index.php?q=$1&d=$2 [L,QSA] the files still don’t download. huh

          Try disabling Friendly Alias Paths if you have it enabled in your MODx manager.
            • 17412
            • 270 Posts
            Quote from: sirlancelot at Mar 08, 2007, 10:48 AM

            Try disabling Friendly Alias Paths if you have it enabled in your MODx manager.

            Yep that’s already disabled.
              • 31112
              • 36 Posts
              Hi.
              I would like to use the snippets for my site, with the plugin, but i have a problem with the TV. I didn’t understand how it works.
              How can I set the TV to work with the snippets ?

              thx

              EDIT: ok i found how can i do. smiley
                Sorry for my english, it’s not my natural language. smiley
                • 5225
                • 4 Posts
                I’m facing the following issue: When I set the [tt]FileDownloadFolder[/tt] TV to

                [tt]@FILE iloop/assets/config/ant-generated/current-download-root.property[/tt]

                where iloop/assets/config/ant-generated/current-download-root.property contains the string "iloop/assets/content/products/app", I get the following error message on loading the page:

                « MODx Parse Error »<br /><br />MODx encountered the following error while attempting to parse the requested resource:<br />« PHP Parse Error »<br /> <br />PHP error debug<br />  Error:	array_merge() [function.array-merge]: Argument #2 is not an array	 <br />  Error type/ Nr.:	Warning - 2	 <br />  File:	/home/www/web59/html/modx/assets/snippets/filedownload/filedownload.class.inc.php	 <br />  Line:	146	 <br />  Line 146 source:	 $this->allFiles = array_merge($this->allFiles,$this->getFiles($this->_config[’getFolder’]));	 <br /> <br />Parser timing<br />  MySQL:	0.0133 s	(11 Requests)<br />  PHP:	0.0744 s	 <br />  Total:	0.0877 s


                However, when I directly set the [tt]FileDownloadFolder[/tt] TV to the value contained in the file, i.e. "iloop/assets/content/products/app", the file listing works.

                I verified that the [tt]@FILE iloop/assets/config/ant-generated/current-download-root.property[/tt] command itself works by putting it into a separate TV in the same template, which I then use in that template’s code. In this case, the value as it is in the file is displayed correctly as expected when rendering the page in the browser.

                What am I doing wrong?
                  • 5225
                  • 4 Posts
                  Well, I think it’s a bug somewhere in the processing chain of the FD snippet’s code.

                  I fixed it temporarily by adding

                  [tt]$this->Set(’getFolder’, ProcessTVCommand($this->Get(’getFolder’))); // added rC 2007-04-13[/tt]

                  before line #86 in [tt]filedownload.class.inc.php[/tt], which certainly is the wrong place to do something like this smiley, but for now it works until a more official fix is available.
                    • 33191
                    • 15 Posts
                    Hi,
                    I would like to use FileDownload with filedownloadplugin, but here the problems which I encounter: if the call in my TV is: /home/www/1263ae0777d4b1e0614a6d52b51e5e45/web/modx/assets, and I like to download a photo in assets/images, the downloading does not start and I fall back to the root path: / (assets)

                    But if I set the FileDownloadFolder TV to: assets, I’m facing the following error when I try to download the photo:

                    « MODx Parse Error »
                    MODx encountered the following error while attempting to parse the requested resource:
                    « PHP Parse Error »

                    PHP error debug
                    Error: set_time_limit() has been disabled for security reasons
                    Error type/ Nr.: Warning - 2
                    File: /home/www/1263ae0777d4b1e0614a6d52b51e5e45/web/modx/manager/includes/document.parser.class.inc.php(724) : eval()’d code
                    Line: 154

                    Parser timing
                    MySQL: 0.0358 s (60 Requests)
                    PHP: 0.1328 s
                    Total: 0.1686 s

                    I tested that with and without Friendly url’s, the problem is the same and this is appening only when I click for download, I mean that for the rest is going well, it is possible to browse the folders etc..., euhhh no I dont see the delete link even if I’m logged in as "Formation" web group user, but not so important at the moment !

                    here is my snippet call:
                    [!FileDownload? &getFolder=`assets` &browseDirectories=`1` &dateFormat=`d-m-Y` &downloadGroups=`Formation` &useDbCount=`0` &tplList=`FileDownloadTpl` &imgLocat=`assets/snippets/filedownload/images` &imgTypes=`fdimages` &browseDirectories=`1` &includeFileSize=`1`!]

                    If I take off the &getFolder parameter it change nothing, I suppose because the path is allready in the TV’s parameter

                    I’m using modx 0.9.6-RC1, FileDownload 2.5 and FileDownloadPlugin 1.2

                    Someone has got an Idea about that ?

                    And sorry for my terrible English, hope you can anderstand my message wink
                      • 33191
                      • 15 Posts
                      Ok, it is my web hoster who set the set_time_limit() function disabled sad
                      so I comment it out in FileDownloadPlugin and now it is working !
                      if($fp = @fopen($downloadFile, "r"))
                      		{
                      			while(@ob_end_clean());
                      			//set_time_limit(0); <-- the comment out
                      			ignore_user_abort(1);
                      			$aborted = false;
                      			for($rno = 0; !$aborted && (($rno < $parts) || (!$rno && !$parts)); $rno ++)
                      			{..etc...

                      Not sure is the best thing to do, but I dont see other way to get the FileDownload working, so....