feat: datasource
This commit is contained in:
@@ -55,15 +55,16 @@ def resource_payload(
|
||||
resource: DataResources,
|
||||
storage_object: StorageObjects,
|
||||
) -> dict[str, Any]:
|
||||
# ``object_key`` is stored as ``workspace/{ws_id}/{user_id}/.resources/{file_name}``.
|
||||
# Two Jupyter-facing path views:
|
||||
# ``object_key`` is stored as ``{ws_id}/{user_id}/.resources/{file_name}``
|
||||
# (see ``backend/services/storage.py:create_upload_record``). Two
|
||||
# Jupyter-facing path views:
|
||||
# - ``jupyter_accessible_path``: per-user Jupyter-relative path. The
|
||||
# Jupyter root_dir is already ``workspace/{ws_id}/{user_id}/``, so we
|
||||
# only return the tail ``.resources/{file_name}`` for copy-paste use.
|
||||
# Jupyter root_dir is already ``workspace/{ws_id}/{user_id}/``, so
|
||||
# we return the tail ``.resources/{file_name}`` for copy-paste use.
|
||||
# - ``absolute_path``: full filesystem path inside the Jupyter
|
||||
# container (the rclone mount root). Shape:
|
||||
# ``{workspaces_root}/{ws_id}/{user_id}/.resources/{file_name}``.
|
||||
workspace_prefix = f"workspace/{resource.workspace_id}/"
|
||||
workspace_prefix = f"{resource.workspace_id}/"
|
||||
user_prefix = f"{resource.owner_user_id}/"
|
||||
jupyter_accessible_path = ""
|
||||
absolute_path = ""
|
||||
|
||||
Reference in New Issue
Block a user