We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40122
    • 330 Posts
    I am trying to upload a large pdf (15mb) but I get the error message 'Access Denied' after the browsers progress bar reached 100%. My upload_maxsize is set to 30mb. I tried again with a smaller PDF (2mb) and it works fine.

    Is there a reason for this? A timeout?

    Thanks!
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      There are other factors at work here. Besides the PHP limits, MODx has a limit, and your web server also has a limit.
        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
        • 32025
        • 305 Posts
        Agreed it's easier to upload files directly while you are in your MODx manager. But if you are a web developer you likely have an ftp client like Filezilla. Otherwise you can upload files directly to your server via your hosting control panel. Use your outside ftp client and everything you want will upload to the server. Then you can use the window to select the file and add the link.

        I am wondering if this issue is related to your other post I just answered about TinyMCE. Still while I do use TinyMCE to upload files to the server I also know its not built primarily as an ftp client. There are much better tools.
          Making the web a better place on site at a time! Dayton Web Design: http://www.dayton-web-design.com/
          • 5430
          • 247 Posts
          MODX makes a horrible file manager. If you are working in a cPanel setup, the standard filemanager that's typically installed with cPanel is way better, even better than standard FTP because it will allow you to zip/unzip files and folders for faster transfer (can't do that with ftp, only sftp or ssh). If your cPanel has no filemanager, look into a good ftp/sftp client.
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            The Manager's file manager uses simple HTML file upload features and PHP to process the uploaded file, just like any HTML form with a file upload field. HTTP was not originally intended for file transfer, just for relatively short hypertext files - i.e. simple text files with links to other hypertext files. Handling binary files like images and forms with the ability to upload files was added later, actually HTTP file upload was first officially described in 1995. On the other hand, FTP was originally intended and designed for file transfer. Apache/nginx and friends are HTTP servers, so they just don't handle uploading of large and/or binary files as well as a dedicated FTP server does. SFTP is a different matter altogether, being a function of SSH.

            Browsers and servers had to be modified to enable the processing of uploaded files. Most servers have modules to provide this functionality, so it's possible to have an HTTP server that does not handle file uploads at all.

            When a server receives a file that is uploaded via HTTP (the form's GET or POST instructs the server to fetch the file and provides the path to the file on the client's computer), it is temporarily placed in a common holding directory with a randomly generated name, and the file's metadata is made available for a period of time. A script (in whatever language, perl, ruby, python, php, C, etc) needs to be written to process the file, moving it to the desired location and renaming it according to the information in the metadata. PHP provides the $_FILES array by fetching that metadata from the server and converting it to a PHP array. Our .php file processing script (see core/model/modx/processors/browser/file/upload.class.php) uses that array to move the file to a permanent location. The temporary file is automatically removed from the server.

            http://tools.ietf.org/html/rfc1867
            http://commons.apache.org/proper/commons-fileupload/using.html
            http://wiki.nginx.org/HttpUploadModule
              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