public inbox for [email protected]
help / color / mirror / Atom feedFrom: Surinder Kumar <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: [pgAdmin4][Patch]: RM1397 - File upload not working in File Manager in pgAdmin4 Runtime
Date: Thu, 4 Aug 2016 18:29:03 +0530
Message-ID: <CAM5-9D-5PETJ4=SA+zp6J3GGZ0UkG310DTVpgV=M3frioUsg2g@mail.gmail.com> (raw)
List-Unsubscribe: <mailto:[email protected]?body=unsub%20pgadmin-hackers>
Hi
*Issue:*
When a file is uploaded via FileManager it gets storage directory path from
STORAGE_DIR config variable. but in case of pgAdmin4 Runtime it is set to
None, that means STORAGE_DIR path should be the root directory.
The path formed to file was "None/filename.ext'. but it should be
'/filename.txt' which is now fixed.
Please find attached patch and review.
Thanks,
Surinder Kumar
--
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
Attachments:
[application/octet-stream] RM1397.patch (875B, 3-RM1397.patch)
download | inline diff:
diff --git a/web/pgadmin/misc/file_manager/__init__.py b/web/pgadmin/misc/file_manager/__init__.py
index d788b9e..0fe6f04 100644
--- a/web/pgadmin/misc/file_manager/__init__.py
+++ b/web/pgadmin/misc/file_manager/__init__.py
@@ -242,13 +242,15 @@ class Filemanager(object):
self.trans_id = trans_id
self.patherror = encode_json(
{
- 'Error': gettext('No permission to operate on specified path.'),
+ 'Error': gettext('No permission to operate on \
+ specified path.'),
'Code': -1
}
)
self.dir = get_storage_directory()
- if self.dir is not None and isinstance(self.dir, list):
+ if ((self.dir is not None and isinstance(self.dir, list)) or
+ self.dir is None):
self.dir = ""
@staticmethod
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: [pgAdmin4][Patch]: RM1397 - File upload not working in File Manager in pgAdmin4 Runtime
In-Reply-To: <CAM5-9D-5PETJ4=SA+zp6J3GGZ0UkG310DTVpgV=M3frioUsg2g@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