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!
Michael TobischDNN★MVP
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 :
?
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
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
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). :)
I have been unsuccessful at getting larger files to upload. here is the snippet from my webi.config
http://www.dalegraham.com/web.zip
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="<,>,*,%,:,\,?" 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.
These Forums are dedicated to the discussion of DNN Platform.
For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:
Awesome! Simply post in the forums using the link below and we'll get you started.