We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 727
    • 502 Posts
    I am trying to upload a gif to the /assets/images folder and it is giving me:

    Uploading of this kind of file isn’t allowed!

    In the configuration the uploadable image types is set to:

    jpg,jpeg,png,gif,psd,ico,bmp


    and the filename is greyfade.gif.

    I’m using rev 1581. Any ideas?

    Andy
      • 10487 MODX Staff
      • 1,535 Posts
      Hi ajayre,

      It works fine on my local test setup running rev.1581. How do you install rev.1581? Was it using a fresh install or was it via doing a patch upgrade. And, one last question, if you patched it, what version did you patch from? I’m suspecting that not all the files have been updated correctly.

      One thing to try, if this is a patch upgrade, is to try resaving your system configuration settings in the manager- that will ensure the setting changes made for this particular addition are saved to the database.

        Garry Nutting
        Senior Developer
        MODX, LLC

        Email: [email protected]
        Twitter: @garryn
        Web: modx.com
        • 727
        • 502 Posts
        Hi Gary,

        It was a clean install. I tried resaving the configuration and then uploading a file but I received the same result.

        Andy
          • 10487 MODX Staff
          • 1,535 Posts
          Okay, I think I see the problem. Were you trying to upload the file through the file manager? This hasn’t been updated yet for the filetype changes (I’ll make this a priority)

          A temporary fix is to add the gif extension to the list of ’Uploadable File Types’ in the system configuration.
            Garry Nutting
            Senior Developer
            MODX, LLC

            Email: [email protected]
            Twitter: @garryn
            Web: modx.com
            • 10487 MODX Staff
            • 1,535 Posts
            And here is the fix which I’ve just submitted to my personal branch in SVN ...

            In files.dynamic.php (in manager/actions/), change line 19 which reads:
            $uploadablefiles = split(",", $upload_files);

            To the following:
            // make arrays from the file upload settings
            $upload_files = explode(',',$upload_files);
            $upload_images = explode(',',$upload_images);
            $upload_media = explode(',',$upload_media);
            $upload_flash = explode(',',$upload_flash);
            // now merge them
            $uploadablefiles = array_merge($upload_files,$upload_images,$upload_media,$upload_flash);

            And, all should be well! smiley

            Hope that helps,
            Garry
              Garry Nutting
              Senior Developer
              MODX, LLC

              Email: [email protected]
              Twitter: @garryn
              Web: modx.com
              • 727
              • 502 Posts
              Gary,

              That did the trick. Thanks!!

              Andy
                • 19882
                • 7 Posts
                Hello
                I Have code:

                $upload_files = explode(',',$upload_files);
                $upload_images = explode(',',$upload_images);
                $upload_media = explode(',',$upload_media);
                $upload_flash = explode(',',$upload_flash);
                // now merge them
                $uploadablefiles = array_merge($upload_files,$upload_images,$upload_media,$upload_flash);


                and still i have message "Uploading of this kind of file isn\’t allowed!"
                I have uploaded meny kind of file which i have in "Uploadable Image Types:" (in attachment settings.jpg) and nothing

                I Have modx 0.9.6.3

                In FCKeditor (in attachment) i see only directories (any files), and if i wont uplod files i see ’Disalowed file type’

                Can anybody help me ?
                  • 19882
                  • 7 Posts
                  Now is ok. I dont have set priviliges on my user account. Now is correct (im attachment )
                    • 12419
                    • 1 Posts
                    I also experienced a similar problem with not being able to upload a file through the File Manager. I made sure my user had the correct permissions, and that the file extension was permitted in the configuration.

                    My problem turned out to be a case sensitivity problem with the filename. My configuration allowed for the "pdf" extension, but my file was named COMMENTS.PDF. It would not upload because PDF != pdf. I renamed the file to COMMENTS.pdf, and it uploaded successfully.