gurt.download GURT:// support & docs

This commit is contained in:
Face
2025-09-25 21:56:54 +03:00
parent b54ae9a041
commit e9f8500503
5 changed files with 104 additions and 17 deletions

24
docs/docs/lua/download.md Normal file
View 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.
![Download animation in Flumi](../static/img/docs/download.gif)
### 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.

View File

@@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 960 KiB