Re: import upload file to pgadmin get CSRF error
От | Where is Where |
---|---|
Тема | Re: import upload file to pgadmin get CSRF error |
Дата | |
Msg-id | CAK3r-hPTsyWswn7stnA6rsLkVxjMi_SvzJELrBpJKamtOZQdMQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: import upload file to pgadmin get CSRF error (Khushboo Vashi <khushboo.vashi@enterprisedb.com>) |
Ответы |
Re: import upload file to pgadmin get CSRF error
|
Список | pgadmin-support |
Thank you! I just saw that too. I tried to apply that diff only: https://redmine.postgresql.org/projects/pgadmin4/repository/revisions/08b78fb6a11283731cdf59d2a29fdc75e459582e/diff/web/pgadmin/misc/file_manager/static/js/utility.js
But it doesn't seem to fix the problem.
// We need to append our csrf token with dropzone's ajax request header |
let csrfToken = {}; |
csrfToken[pgAdmin.csrf_token_header] = pgAdmin.csrf_token; |
|
$('div#multiple-uploads').dropzone({ |
paramName: 'newfile', |
url: pgAdmin.FileUtils.fileConnector, |
headers: csrfToken,
Thanks, Junran
On Mon, Jun 24, 2019 at 3:47 PM Khushboo Vashi <khushboo.vashi@enterprisedb.com> wrote:
On Mon, Jun 24, 2019 at 11:13 AM Where is Where <whisere@gmail.com> wrote:Hello, we are trying to import csv file to database from pgadmin, but when uploading file it reports 'Any idea is much appreciated.400 Bad Request <h1>Bad Request</h1> <p>The CSRF token is missing.</p> 'I looked at config.py but can't find any related setting.This issue has already been reported and fixed. (Ref: https://redmine.postgresql.org/issues/4350)You will get the fix in the upcoming release which is scheduled on coming Thursday.Thanks,Khushboo
В списке pgadmin-support по дате отправления: