public inbox for [email protected]
help / color / mirror / Atom feedFrom: Murtuza Zabuawala <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: [RM#4350][pgAdmin4] User is not able to upload files using File manager.
Date: Wed, 12 Jun 2019 17:26:36 +0530
Message-ID: <CAKKotZS4Ut916Cso1xo3cH87_jRVvjavbH1tHrEBbZ47moMyvQ@mail.gmail.com> (raw)
Hi,
PFA minor patch to fix the issue where user is unable to upload the files
using File manager.
--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Attachments:
[application/octet-stream] RM_4350.diff (891B, 3-RM_4350.diff)
download | inline diff:
diff --git a/web/pgadmin/misc/file_manager/static/js/utility.js b/web/pgadmin/misc/file_manager/static/js/utility.js
index 0d83058d..1403d98f 100644
--- a/web/pgadmin/misc/file_manager/static/js/utility.js
+++ b/web/pgadmin/misc/file_manager/static/js/utility.js
@@ -1466,9 +1466,14 @@ define([
'<a href="javascript:void(0);" class="fa fa-trash dz_file_remove" data-dz-remove></a>' +
'</div>';
+ // 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,
maxFilesize: fileSize,
maxFiles: config.upload.number,
addRemoveLinks: true,
view thread (2+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: [RM#4350][pgAdmin4] User is not able to upload files using File manager.
In-Reply-To: <CAKKotZS4Ut916Cso1xo3cH87_jRVvjavbH1tHrEBbZ47moMyvQ@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox