# sto\_share

```python
def sto_share(file_path: str, collection_name: str = None) -> dict
```

[Source code](https://github.com/agiresearch/AIOS/blob/main/aios/storage/filesystem/lsfs.py)

Parameters:

* file\_path (str): Path to the file to share
* collection\_name (str): Name of the collection/agent (optional)

Returns:

Success response (Dict):&#x20;

```python
{
    "file_name": str,       # Name of the shared file
    "file_path": str,       # Path to the file
    "share_link": str,      # Public URL for accessing the file
    "expires_in": str,      # "7 days"
    "last_modified": str    # ISO format timestamp
}
```

Failure response (Dict):&#x20;

```python
{
    "error": str  # Error message
}
```
