diff --git a/docs/en_US/release_notes_6_5.rst b/docs/en_US/release_notes_6_5.rst index a11b99717..9e5c685bc 100644 --- a/docs/en_US/release_notes_6_5.rst +++ b/docs/en_US/release_notes_6_5.rst @@ -23,6 +23,7 @@ Bug fixes | `Issue #7035 `_ - Fixed an issue where connections keep open to (closed) connections on the initial connection to the database server. | `Issue #7085 `_ - Ensure that Partitioned tables should be visible correctly when creating multiple partition levels. | `Issue #7100 `_ - Fixed an issue where the Browser tree gets disappears when scrolling sequences. +| `Issue #7118 `_ - Ensure that JSON files should be downloaded properly from the storage manager. | `Issue #7123 `_ - Fixed an issue where restore generates incorrect options for the schema. | `Issue #7127 `_ - Added validation for Hostname in the server dialog. | `Issue #7135 `_ - Enforce the minimum Windows version that the installer will run on. diff --git a/web/pgadmin/misc/file_manager/__init__.py b/web/pgadmin/misc/file_manager/__init__.py index 16da890d4..db5f0b6d4 100644 --- a/web/pgadmin/misc/file_manager/__init__.py +++ b/web/pgadmin/misc/file_manager/__init__.py @@ -1222,7 +1222,9 @@ class Filemanager(object): else: dir_path = os.path.dirname(path) - response = send_from_directory(dir_path, name, as_attachment=True) + response = send_from_directory(dir_path, name, + mimetype='application/octet-stream', + as_attachment=True) response.headers["filename"] = name return response diff --git a/web/pgadmin/tools/storage_manager/__init__.py b/web/pgadmin/tools/storage_manager/__init__.py index 14c240316..3024e0f6c 100644 --- a/web/pgadmin/tools/storage_manager/__init__.py +++ b/web/pgadmin/tools/storage_manager/__init__.py @@ -9,19 +9,12 @@ """A blueprint module implementing the storage manager functionality""" -import simplejson as json -import os - -from flask import url_for, Response, render_template, request, current_app +from flask import url_for, Response, render_template from flask_babel import gettext as _ -from flask_security import login_required, current_user -from pgadmin.misc.bgprocess.processes import BatchProcess, IProcessDesc -from pgadmin.utils import PgAdminModule, get_storage_directory, html, \ - fs_short_path, document_dir, IS_WIN, does_utility_exist -from pgadmin.utils.ajax import make_json_response, bad_request +from flask_security import login_required -from config import PG_DEFAULT_DRIVER -from pgadmin.model import Server +from pgadmin.utils import PgAdminModule +from pgadmin.utils.ajax import bad_request from pgadmin.utils.constants import MIMETYPE_APP_JS MODULE_NAME = 'storage_manager'