Back to Wails

File API Demo

v3/examples/web-apis/file-api/frontend/index.html

2.13.01.0 KB
Original Source

File API Demo

The File API provides access to file information and content, enabling web applications to read files selected by users through file inputs or drag-and-drop operations.

File API available: checking...

API Support

Select Files

Drop files here or click to select

Supports multiple files of any type

File Information

Select a file above to see its details

No file selected yet...

Read File Content

Choose how to read the selected file

As TextAs Data URLAs ArrayBufferAs Binary String Read FileAbort

Select a file and click "Read File" to see content...

File Slice Demo

Read a portion of the selected file using slice()

Start byte:

End byte:

Read Slice Select a file and define a range to read a slice...

Create File from Text

Create a new File object from text content

File content:Hello, this is a test file created using the File API!

File name:

MIME type:

Create FileDownload File Click "Create File" to create a new File object...

Event Log

Clear Log

Ready to log file events...