[Solved] Adding files to the default library

Hello,
I would like to add files to the default library on a Seafile Server.
I try to use the “import” button located in Libraries > System > My Library Template from the admin zone, but it doesn’t work : the file selection dialog box opens, I do select a file, I submit and then nothing happens…

Looking at the seahub log I find this error :
2021-01-28 09:05:41,954 [WARNING] django.security.csrf:160 _reject Forbidden (CSRF token missing or incorrect.): /sys/libraries/21e203ea-96b2-407f-891e-84a5546529a4/My Library Template/127.0.0.1/seafhttp/upload-aj/54518734-7987-4317-b5b2-0851c882a0c2

It is on a test cluster we are working on, but I can’t get it to work either on a production machine…
Does anyone got it to work ?
Any idea on the problem ?

By the way this happens on Seafile Pro 7.1.7 :slightly_smiling_face:

Hi Romain, I cannot reproduce the problem.


CSRF is Cross-Site Request Forgery. In many cases, logging out/logging in or clearing caches can help. If it does not, you have to dig deeper.

Ralf,

Thanks a lot for your fast and precise answer.
So this means that I have a problem with my NFS share… which is strange because I can read and write in it from bash without any error.
I followed these instructions : https://manual.seafile.com/deploy_pro/setup_seafile_cluster_with_nfs/
This drives me crazy !

Hello,
Problem solved !
SERVICE_URL and FILE_SERVER_ROOT were left with default values and changing them with the full qualified domain name of the server did the job.
No more CSRF errors and modifications to the default library are working.

I hope it might help someone.