gurt.download GURT:// support & docs
This commit is contained in:
24
docs/docs/lua/download.md
Normal file
24
docs/docs/lua/download.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# Download API
|
||||
|
||||
The download API allows Lua scripts to trigger file downloads from URLs.
|
||||
|
||||
## gurt.download
|
||||
|
||||
Downloads a file from a URL and saves it to the user's default download location.
|
||||
|
||||

|
||||
|
||||
### Syntax
|
||||
|
||||
```lua
|
||||
download_id = gurt.download(url filename)
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
- **url** (string): The URL to download from. Supports HTTP, HTTPS, and gurt:// protocols.
|
||||
- **filename** (string, optional): The filename to save as. If not provided, the filename will be extracted from the URL or default to "download".
|
||||
|
||||
### Returns
|
||||
|
||||
- **download_id** (string): A unique identifier for the download operation.
|
||||
@@ -48,6 +48,7 @@ const sidebars: SidebarsConfig = {
|
||||
'lua/crumbs',
|
||||
'lua/audio',
|
||||
'lua/canvas',
|
||||
'lua/download',
|
||||
'lua/network',
|
||||
'lua/regex',
|
||||
'lua/handling',
|
||||
|
||||
BIN
docs/static/img/docs/download.gif
vendored
Normal file
BIN
docs/static/img/docs/download.gif
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 960 KiB |
Reference in New Issue
Block a user