• Login
  • Register

DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

DNN 9.2.2 CK Editor can't set upload limit

You are not authorized to post a reply.
Sort:


New Member


Posts:11
New Member

    Does anyone know how to fix the issue with CK Editor not being able to set a file upload limit? If you change it from anything other than -1 it sets the upload limit to 0 kb. I've googled for answers but nothing definitive comes up as a solution.

    Cheers!



    Veteran Member


    Posts:577
    Veteran Member

      Andrew,

      the upload limit has to be set in the web.config (search for "<!-- allow large file uploads -->" to find the setting).

      Happy DNNing!
      Michael

      Michael Tobisch
      DNN★MVP

      dnnWerk Austria
      DNN Connect


      Veteran Member


      Posts:423
      Veteran Member

        Posted By Michael Tobisch on 01 Jul 2019 01:41 AM
        Andrew,

        the upload limit has to be set in the web.config (search for "<!-- allow large file uploads -->" to find the setting).

        Happy DNNing!
        Michael

        Michael,

        Is this different from :

        • persona bar
        • settings
        • security
        • more 
        • more security settings
        • Max Upload Size (MB)

        ?

         

        Tjep's digital agencyRegards,
        Tycho de Waard

        Tjep's digital agency
        We just love DNN
        https://www.tjeps.com


        Veteran Member


        Posts:577
        Veteran Member

          Tycho,

          no, but the Windows 98 way of doing it... :-)

          The interesting thing is: Even if I use a value bigger than 28 (MB = 28672 kB) in the web.config, the upload size is limited to 28 MB. Anyone has some inside knowledge how that can be increased (or why it is globally limited to 28 MB)?

          Happy DNNing!
          Michael
           

          Michael Tobisch
          DNN★MVP

          dnnWerk Austria
          DNN Connect


          New Member


          Posts:11
          New Member

            Thanks all, that is a global setting, so is there no functionality to set per portal? Ultimately it would be great to be able to set a size for images to stop users uploading huge images to use in the site but still allow docs and pdfs of a reasonable size.


            Veteran Member


            Posts:577
            Veteran Member

              Andrew,
              I'm afraid, this is a global setting, and affects all portals and all files within one DNN installation. Afaik there is no way out of the box to limit the upload size by file type.
              Happy DNNing!
              Michael

              Michael Tobisch
              DNN★MVP

              dnnWerk Austria
              DNN Connect


              Basic Member


              Posts:83
              Basic Member

                Posted By Andrew on 30 Jun 2019 09:55 PM

                Does anyone know how to fix the issue with CK Editor not being able to set a file upload limit? If you change it from anything other than -1 it sets the upload limit to 0 kb. I've googled for answers but nothing definitive comes up as a solution.

                Cheers!

                 

                I am not aware of that issue, are you using the latest Dnn release (9.3.2) ?

                Also those are all different limits, the one in the web.config affects every request.

                The one in the server settings affect the Dnn file system (not applied if a module uses direct access to the windows filesystem api)

                The one in the html editor manager only affets it, so wont limit someone using the file manager.

                If you are using the latest release and cannot save that setting, I recommend creating an issue here about it https://github.com/DNN-Connect/CKEditorProvider

                 



                Veteran Member


                Posts:340
                Veteran Member

                  Posted By Andrew on 02 Jul 2019 06:43 PM
                  Thanks all, that is a global setting, so is there no functionality to set per portal? Ultimately it would be great to be able to set a size for images to stop users uploading huge images to use in the site but still allow docs and pdfs of a reasonable size.

                  In instances where I've needed to enforce this for non-technical end-users, I've disabled image uploads and added a module where they upload images. The module then resizes and optimizes the image for them (and us). :)

                  Will Strohl

                  Upendo Ventures DNN experts since 2003
                  Official provider of the DNN-based E-Commerce w/ Hotcakes Commerce Cloud and SLA support


                  Basic Member


                  Posts:28
                  Basic Member

                    I have been unsuccessful at getting larger files to upload. here is the snippet from my webi.config

                     

                    http://www.dalegraham.com/web.zip




                    Veteran Member


                    Posts:577
                    Veteran Member

                      Dale,

                      please replace the angle brackets by square brackets or "<_" and "_>" or something - otherwise they do not display in the post. As far as I can see from the source code of this page, the line is

                      [httpruntime usefullyqualifiedredirecturl="true" targetframework="4.7.2" shutdowntimeout="36000" requestvalidationmode="2.0" requestpathinvalidcharacters="&lt;,&gt;,*,%,:,\,?" requestlengthdiskthreshold="512000" maxurllength="2048" maxrequestlength="512000" fcnmode="Single" executiontimeout="360000" enableversionheader="false"][/httpruntime]
                      
                      

                      The MaxRequestLength is the overall total length the request cannot exceed. The RequestLengthDiskThreshold should be less than the MaxRequestLength value and indicates at what point (or "threshold") the request will begin to be buffered transparently onto disk. The value of RequestLengthDiskThreshold must not exceed the value of MaxRequestLength.

                      In your example, the MaxRequestLength is 512000 kB (which should be 524288, that means 512 MB, but that is not too important). The RequestLengthDiskThreshold is 512000 b (which should also be 524288, which means 512 kB). To be honest, the second value is really high, I normally lower the default value (which is 80 kB = 81920) to 4096 (which is the default allocation unit size of an NTFS disk). That helps to not chew up too much memory in IIS and on the server, so buffering to disk does help keep memory management under control. Also note: the value for MaxRequestLength is in kB, as the value for RequestLengthDiskThreshold is in byte.

                      So far for the theory... :-)

                      In DNN it seems that values for the file size upload are limited to 28 MB - see Settings >> Security >> More >> More Security Settings >> "Max Upload Size". The error message if you enter a value greater than 28 or less than 6 says "Maximum upload size must be between 12 and 28". Changing this value changes the value in the web.config, as the help text suggests ("This is a global setting. Changes to this setting will affect all of your sites.").

                      And also if you change the setting in your web.config to a higher value - this is ignored by DNN when you upload a file.

                      The only way to avoid this behaviour would be a module that ignores the DNN settings (and maybe as well the web.config settings) and writes directly to the file system. There used to be one (SwfFileUploader by Oliver Hine), but this is no longer available and supported (as Flash is reaching the end of its life).

                      To be honest: I think the maximum upload limit should be changed asap. It was not like this in former DNN versions, and it should be in an administrator's or host's responsibility to set it as it's needed. For instance: in an intranet, this could be a high value without any problem.

                      Happy DNNing!
                      Michael

                      Michael Tobisch
                      DNN★MVP

                      dnnWerk Austria
                      DNN Connect
                      You are not authorized to post a reply.

                      These Forums are dedicated to discussion of DNN Platform.

                      For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

                      1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
                      2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
                      3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
                      4. No Flaming or Trolling.
                      5. No Profanity, Racism, or Prejudice.
                      6. Site Moderators have the final word on approving / removing a thread or post or comment.
                      7. English language posting only, please.

                      Would you like to help us?

                      Awesome! Simply post in the forums using the link below and we'll get you started.

                      Get Involved