Use system PHP size for upload limit

This commit is contained in:
Andy Miller
2017-10-11 14:20:39 -06:00
parent 1ae0b9648f
commit af13b12729
2 changed files with 3 additions and 1 deletions

View File

@@ -1,6 +1,8 @@
# v1.6.3
## 10/02/2017
1. [](#improved)
* Use system PHP size for upload limit rather than `system.media.upload_limit` or `file.filesize` plugin options
1. [](#bugfix)
* Fixed chart labels not parsing HTML [#1234](https://github.com/getgrav/grav-plugin-admin/issues/1234)
* Fixed Dropzone timeout to address slow internet connections [#1239](https://github.com/getgrav/grav-plugin-admin/pull/1239)

View File

@@ -59,7 +59,7 @@
{% set page_can_upload = exists or (type == 'page' and not exists and not (field.destination starts with '@self' or field.destination starts with 'self@')) %}
{% if type is not defined or page_can_upload %}
{% set settings = {name: field.name, paramName: (scope ~ field.name)|fieldName ~ (files.multiple ? '[]' : ''), limit: limit, filesize: files.filesize, accept: files.accept} %}
{% set settings = {name: field.name, paramName: (scope ~ field.name)|fieldName ~ (files.multiple ? '[]' : ''), limit: limit, filesize: (config.system.media.upload_limit / 1024 / 1024), accept: files.accept} %}
<div class="form-input-wrapper dropzone files-upload {% if field.fancy is not same as(false) %}form-input-file{% endif %} {{ field.size|default('xlarge') }}" data-grav-file-settings="{{ settings|json_encode|e('html_attr') }}" {% if file_url_add %}data-file-url-add="{{ file_url_add }}"{% endif %} {% if file_url_remove %}data-file-url-remove="{{ file_url_remove }}"{% endif %}>
<input