We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15994
    • 3 Posts
    Hi!
    When I use the link function in FCKeditor, clicks "Browse Server", and there tries to upload a mp3 file, I get "Error, Disallowed file type.". The extension "mp3" is in the list of allowed file types in the MODx System Configuration, and I have checked in the /assets/plugins/fckeditor/fckconfig.js that FCKConfig.LinkUploadAllowedExtensions is an empty string and FCKConfig.LinkUploadDeniedExtensions does not contain mp3 (if this has something to do with this issue).

    Anyone has a suggestion on what might be wrong? I have successfully uploaded other files (e.g. a pdf), and I have increased the allowed file size to be large enough for this mp3 file. I’m using MODx 0.9.2.1 and the FCKeditor that came with it.

    Thank you in advance! smiley
      • 4018
      • 1,131 Posts
      Good question. I’ll look into it and see if I can find a quick fix for ya. Shouldn’t be too difficult. smiley
        Jeff Whitfield

        "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
        • 32963
        • 1,732 Posts
        Hi,

        Please see manager/media/browser/mcpuk/connectors/php/config.php line 169:

        ’AllowedExtensions’ => array("swf","fla","jpg","gif","jpeg","png","avi","mpg","mpeg","midi","mid"),


        You should also log this inside the bug tracker as a feature request.
          xWisdom
          www.xwisdomhtml.com
          The fear of the Lord is the beginning of wisdom:
          MODx Co-Founder - Create and do more with less.
          • 15994
          • 3 Posts
          Thank you for your very quick reply! I am now uploading mp3-files with no problem. smiley

          But then I ran into something else. I have set the max upload size in System configuration to 10 MB (10 * 1024 * 1024 = 10485760). But I still get an error telling me that files of size 2,4 MB are too big... Something told me that this might be the same problem as with the file types, so I looked for a max file size in /manager/media/browser/mcpuk/connectors/php/config.php and found it. It is however just set to $upload_maxsize, which I can’t find a declaration of anywhere. What is this and where am I supposed to set the value for $upload_maxsize?
            • 7923
            • 4,213 Posts
            You should also check what limitations your php installation sets for file sends. Check the php info at adminstration -> view system info and find "post_max_size" to see how much you can send data via POST. Then search "upload_max_filesize" to see what’s the limit for file sends..

            upload_max_filesize and post_max_size

            Files are usually POSTed to the webserver in a format known as ’multipart/form-data’. The post_max_size sets the upper limit on the amount of data that a script can accept in this manner. Ideally this value should be larger than the value that you set for upload_max_filesize.

            It’s important to realize that upload_max_filesize is the sum of the sizes of all the files that you are uploading. post_max_size is the upload_max_filesize plus the sum of the lengths of all the other fields in the form plus any mime headers that the encoder might include. Since these fields are typically small you can often approximate the upload max size to the post max size.

            According to the PHP documentation you can set a MAX_UPLOAD_LIMIT in your HTML form to suggest a limit to the browser. Our understanding is that browsers totally ignore this directive...[/QUOTE]


              "He can have a lollipop any time he wants to. That's what it means to be a programmer."
              • 4018
              • 1,131 Posts
              I’ve added the MP3 file extension as an allowable file type to the Resource Browser so it’ll be part of the next release. I’ll be thinking about how to enhance this and add some abilities to the manager configuration when the time comes to implement a better resource browser solutions. smiley
                Jeff Whitfield

                "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
                • 32963
                • 1,732 Posts
                Good going Jeff
                  xWisdom
                  www.xwisdomhtml.com
                  The fear of the Lord is the beginning of wisdom:
                  MODx Co-Founder - Create and do more with less.
                  • 15994
                  • 3 Posts
                  Thank you! I’m impressed by the quick response in this forum! smiley