File Management
Relative paths resolve against the Android shared external storage root Path.root(), not the App's private data directory; actual access is still limited by system storage permissions.
Endpoints
Sample response for /file/TV
Downloads, Range and caching
A normal download returns 200; a single valid Range returns 206, supporting start-end, open-ended and suffix byte ranges. Multiple or invalid ranges return 416; If-None-Match returns 304 when the ETag matches, and If-Range returns the full file when it does not match.
Rename and move
Both files and directories are supported; a new name is just a name and cannot contain path separators. Existing targets are not overwritten, and a directory cannot move inside itself. The web UI offers batch move and delete, acting item by item and reporting each result.
Upload and delete
The multipart field name is arbitrary; the example uses file. The filename comes from the upload field and cannot be empty, ., .. or contain path separators. ZIPs are extracted into the target directory and other files are copied atomically; a missing file, missing directory or failed operation returns 500 with a text message.
/delFile and /delFolder currently share one recursive delete routine; never assume a directory survives because of the endpoint name. The example only targets the sample directory created earlier — confirm the contents before running it.
Upload, create, rename, move and delete are all restricted to the shared storage root, and the root itself cannot be deleted or moved. LAN requests to /file are restricted the same way; loopback requests may resolve other accessible paths through Path.local.
Related
- Resume and large files: resumable transfers
- Applying subtitles: web player and remote