pub fn download_data(data: &[u8], filename: &str) -> i32
Save arbitrary bytes as a file in the host Downloads directory.
Returns 0 on success, -1 on failure (empty data or filename).