public inbox for [email protected]  
help / color / mirror / Atom feed
[RM#4350][pgAdmin4] User is not able to upload files using File manager.
2+ messages / 2 participants
[nested] [flat]

* [RM#4350][pgAdmin4] User is not able to upload files using File manager.
@ 2019-06-12 11:56 Murtuza Zabuawala <[email protected]>
  2019-06-12 12:52 ` Re: [RM#4350][pgAdmin4] User is not able to upload files using File manager. Dave Page <[email protected]>
  0 siblings, 1 reply; 2+ messages in thread

From: Murtuza Zabuawala @ 2019-06-12 11:56 UTC (permalink / raw)
  To: pgadmin-hackers

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,


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: [RM#4350][pgAdmin4] User is not able to upload files using File manager.
  2019-06-12 11:56 [RM#4350][pgAdmin4] User is not able to upload files using File manager. Murtuza Zabuawala <[email protected]>
@ 2019-06-12 12:52 ` Dave Page <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Dave Page @ 2019-06-12 12:52 UTC (permalink / raw)
  To: Murtuza Zabuawala <[email protected]>; +Cc: pgadmin-hackers

Thanks, applied.

On Wed, Jun 12, 2019 at 12:56 PM Murtuza Zabuawala <
[email protected]> wrote:

> 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
>
>

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2019-06-12 12:52 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-06-12 11:56 [RM#4350][pgAdmin4] User is not able to upload files using File manager. Murtuza Zabuawala <[email protected]>
2019-06-12 12:52 ` Dave Page <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox