bgiExportFileWeb

Category: BGI GUI (Web target only)

Syntax:

bgiExportFileWeb:Int(filepath:String)


Parameters

Returns

Int



Summary

Copies a file from the web file store to the user's computer, as a browser download.

On the web target, files written by your program (bgiSaveRichTextFile, fileWriteFile and so on) are kept in the browser's local storage, not on disk. This hands one of them to the browser, which saves it like any other download (usually into the Downloads folder). The download is named after the last part of filepath.

Returns 1 if the download started, 0 if the web file store has no such file.

Web target only. Desktop programs read and write real files, so they don't need it.



Example
; Save the rich text box, then give the user a copy
bgiSaveRichTextFile(richTextBox, "notes.rtf")
bgiExportFileWeb("notes.rtf")

See also: bgiImportFileWeb


BambooBasic © 2026 Michael Denathorn