Skip to content
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

Drag-and-drop plugin fails with "'_xrsf' missing from POST" #830

Closed
ghost opened this issue Jan 4, 2017 · 2 comments · Fixed by #831
Closed

Drag-and-drop plugin fails with "'_xrsf' missing from POST" #830

ghost opened this issue Jan 4, 2017 · 2 comments · Fixed by #831

Comments

@ghost
Copy link

ghost commented Jan 4, 2017

Platform: Jupyter 4.2.1, Python 3.6.0, Chrome 55.

Well I really need this function, but it can't work in Chrome. Here is the log in Javascript Console:

[Warning] namespace.js:10 accessing `utils` is deprecated. Use `require("base/js/utils")` 
[Error] PUT http://localhost:8888/api/contents/21.jpg 403 (Forbidden)
[Log] Data transfer for drag-and-drop failed.

And the log in Jupyter:

[I 17:15:31.188 NotebookApp] Uploading file to
[W 17:15:31.206 NotebookApp] 403 PUT /api/contents/21.jpg (::1): '_xsrf' argument missing from POST
[W 17:15:31.208 NotebookApp] 403 PUT /api/contents/21.jpg (::1) 4.24ms referer=http://localhost:8888/notebooks/test.ipynb

It seems that the server rejected the uploading file. So is there any solution?

@juhasch
Copy link
Member

juhasch commented Jan 4, 2017

This works for me in both Safari and Chrome with notebook 4.2.1.
This might be the issue for newer notebook versions : jupyter/notebook#1969
I will need to check what we can do to fix this.

@jcb91 jcb91 changed the title Drag-and-drop plugin still not working Drag-and-drop plugin fails with "'_xrsf' missing from POST" Jan 4, 2017
@ghost
Copy link
Author

ghost commented Jan 7, 2017

I just upgraded the plugins:

pip3 install -U https://github.com/ipython-contrib/jupyter_contrib_nbextensions/tarball/master
jupyter contrib nbextension install --user

Thanks, it works pretty well in Chrome now.

But when I try to upload an image which downloaded from network with a %2F in its name, Jupyter returns an error: Error while saving file: xxx/xxx.jpeg [Errno 2] No such file or directory. I know this bug is not a big deal, but I will appreciate it if you can fix it...

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 a pull request may close this issue.

1 participant