Skip to content

Conversation

@welcoMattic
Copy link
Contributor

No description provided.

@welcoMattic welcoMattic mentioned this pull request Nov 3, 2015
streamtw added a commit that referenced this pull request Nov 4, 2015
fix(Upload): fix input name
@streamtw streamtw merged commit 0634430 into UniSharp:master Nov 4, 2015
@welcoMattic
Copy link
Contributor Author

It fix upload through original file input of ckeditor (tab Upload), I think we should change the name of file input inside the filemanage, to match it to the ckeditor's one.

Are you ok? I'll PR soon

@streamtw
Copy link
Member

streamtw commented Nov 4, 2015

Just found that upload function in "Upload" tab does not work.
It with be done next week, and fixing input name will be the first step.
Thank you again.

@welcoMattic
Copy link
Contributor Author

Yes, it fails because of csrf_token not provided.
A quick hack is to set the value of csrf_token inside a meta tag with content attribute that contains the token, and get it with a basic js selector and inject it on your ckeditor config (fileupload routes) named as _token.

Example:

<meta name="csrf-token" content="{{ csrf_token() }}" />
...
var csrfToken = $('meta[name="csrf-token"]').attr('content');
...
filebrowserImageUploadUrl: '/laravel-filemanager/upload?type=Images&_token=' + csrfToken,

@streamtw
Copy link
Member

streamtw commented Nov 5, 2015

I just fixed csrf issue.
Please update to dev-master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants