-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uploadlimit of course and site is not overriden by block #20
Comments
The branch feature/uploadlimit contains a current implementation of a custom QuickFormElement, which extends the existing filemanager. Unfortunately, we needs to copy lots of code to insert one single line. |
Apache seems to hold uploaded files in memory until the upload completes, so at least maintaining that limit may be advisable (and blindly increasing it may not). Therefore it will become necessary to implement our own file manager with support for chunked uploads, each chunk being smaller than the upload limit. It could be based e.g. on http://www.resumablejs.com . |
Or even better. Bring chunked uploads into core!! :) |
The current branch makes also the following core changes necessary....I can not see any other way!
|
Hi Tobias, You are right, it would need a core change to limit the upload size to specific values, but it is possible to unlimit the upload size in total: Our solution:
Kind regards |
Our current workaround is adding this
Not 100% secure because people can just send custom HTTP requests with that referrer to upload larger-than-allowed files in other places. But it's just a workaround and this way we don't have to change the core. Edit: |
I noticed that the solution of @synergy-wagner works only for blocks that are added to a course. However, you can also add a block to the site and configure it to only be displayed in course main pages. In that case the parent context of the block is not a course but the system. But the I fixed that in #72. |
I can see that both of your versions work. In my point of view, the best way would be to integrate a way to allow plugins to exceed the site and course uploadlimits in core. But I can already see that the HQ might not be happy about that. |
As this enhancement can't be implemented without changing Moodle core first and as https://github.com/Opencast-Moodle/moodle-local_chunkupload is now there to solve this issue, I am wondering if we should close this issue with a reference to https://github.com/Opencast-Moodle/moodle-local_chunkupload as the recommended solution. |
Yes, I think we can do that. Chunkupload is well integrated with the block and provides a clean solution. |
The problem is that get_user_max_upload_file_size, which is called frequently within the implementation of filemanager, sets the max upload size to the minimum out of php, site, course and module limit. This way the block is not able to override the other limits in the moodle site.
The text was updated successfully, but these errors were encountered: