diff --git a/.gitignore b/.gitignore index 5fbfb941ac3c7..2652502a02639 100644 --- a/.gitignore +++ b/.gitignore @@ -50,7 +50,6 @@ env venv* env_py3 envpy3 -env36 local_config.py /superset_config.py /superset_text.yml @@ -66,7 +65,10 @@ superset-websocket/config.json *.js.map node_modules npm-debug.log* -superset/static/assets +superset/static/assets/* +!superset/static/assets/.gitkeep +superset/static/uploads/* +!superset/static/uploads/.gitkeep superset/static/version_info.json superset-frontend/**/esm/* superset-frontend/**/lib/* diff --git a/UPDATING.md b/UPDATING.md index eb2b6714af07d..4a67b267383d0 100644 --- a/UPDATING.md +++ b/UPDATING.md @@ -37,6 +37,7 @@ assists people when migrating to a new version. - [31503](https://github.com/apache/superset/pull/31503) Deprecating python 3.9.x support, 3.11 is now the recommended version and 3.10 is still supported over the Superset 5.0 lifecycle. - [29121](https://github.com/apache/superset/pull/29121) Removed the `css`, `position_json`, and `json_metadata` from the payload of the dashboard list endpoint (`GET api/v1/dashboard`) for performance reasons. - [29163](https://github.com/apache/superset/pull/29163) Removed the `SHARE_QUERIES_VIA_KV_STORE` and `KV_STORE` feature flags and changed the way Superset shares SQL Lab queries to use permalinks. The legacy `/kv` API was removed but we still support legacy links in 5.0. In 6.0, only permalinks will be supported. +- [25166](https://github.com/apache/superset/pull/25166) Changed the default configuration of `UPLOAD_FOLDER` from `/app/static/uploads/` to `/static/uploads/`. It also removed the unused `IMG_UPLOAD_FOLDER` and `IMG_UPLOAD_URL` configuration options. ### Potential Downtime diff --git a/superset/config.py b/superset/config.py index 42d6d0957283d..0a9d150ce622b 100644 --- a/superset/config.py +++ b/superset/config.py @@ -752,17 +752,12 @@ class D3TimeFormat(TypedDict, total=False): # Image and file configuration # --------------------------------------------------- # The file upload folder, when using models with files -UPLOAD_FOLDER = BASE_DIR + "/app/static/uploads/" +UPLOAD_FOLDER = BASE_DIR + "/static/uploads/" UPLOAD_CHUNK_SIZE = 4096 -# The image upload folder, when using models with images -IMG_UPLOAD_FOLDER = BASE_DIR + "/app/static/uploads/" - -# The image upload url, when using models with images -IMG_UPLOAD_URL = "/static/uploads/" -# Setup image size default is (300, 200, True) -# IMG_SIZE = (300, 200, True) - +# --------------------------------------------------- +# Cache configuration +# --------------------------------------------------- # Default cache timeout, applies to all cache backends unless specifically overridden in # each cache config. CACHE_DEFAULT_TIMEOUT = int(timedelta(days=1).total_seconds()) diff --git a/superset/static/assets/.gitkeep b/superset/static/assets/.gitkeep new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/superset/static/uploads/.gitkeep b/superset/static/uploads/.gitkeep new file mode 100644 index 0000000000000..e69de29bb2d1d