瀏覽代碼

Deprecate get_asset_path (#2644)

Nikhil Rao 1 年之前
父節點
當前提交
899e35edba
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      reflex/compiler/utils.py

+ 6 - 0
reflex/compiler/utils.py

@@ -382,6 +382,12 @@ def get_asset_path(filename: str | None = None) -> str:
     Returns:
         The path of the asset.
     """
+    console.deprecate(
+        feature_name="rx.get_asset_path",
+        reason="use rx.get_upload_dir() instead.",
+        deprecation_version="0.4.0",
+        removal_version="0.5.0",
+    )
     if filename is None:
         return constants.Dirs.WEB_ASSETS
     else: