Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
dropzonejs
Commits
2cd7bed9
Commit
2cd7bed9
authored
Jul 31, 2015
by
Primoz Hmeljak
Browse files
by primsi: require _csrf_token for dropzonejs.upload route.
parent
721e5175
Changes
2
Hide whitespace changes
Inline
Side-by-side
dropzonejs.routing.yml
View file @
2cd7bed9
...
...
@@ -4,3 +4,4 @@ dropzonejs.upload:
_controller
:
'
\Drupal\dropzonejs\Controller\UploadController::handleUploads'
requirements
:
_permission
:
'
dropzone
upload
files'
_csrf_token
:
'
TRUE'
src/Element/DropzoneJs.php
View file @
2cd7bed9
...
...
@@ -78,7 +78,7 @@ class DropzoneJs extends FormElement {
*/
public
static
function
preRenderDropzoneJs
(
$element
)
{
$element
[
'#attached'
][
'drupalSettings'
][
'dropzonejs'
]
=
[
'upload_path'
=>
base_path
()
.
'dropzonejs
/
upload'
,
'upload_path'
=>
\
Drupal
::
url
(
'dropzonejs
.
upload'
)
,
'instances'
=>
[
$element
[
'#id'
]
=>
[
'maxFilesize'
=>
$element
[
'#max_filesize'
],
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment