# file_picker_web 4.2.0

Web platform implementation of the file_picker plugin, providing browser file selection, file streaming, and file loading.




## Installing
```
export PUB_HOSTED_URL=https://pub.mirror.p-hatan.com
flutter pub add file_picker_web
```
Published: 2026-10-15T14:52:08.478771Z
Expected archive SHA-256: a2288008280aabe371aff029466b3405e60838e0a1d714767488c59b926c8b8c

Available in cache; verification: upstream_checksum
## Direct dependencies
- cross_file: ^0.3.5+4
- file_picker_platform_interface: ^4.0.0
- flutter: map[sdk:flutter]
- flutter_web_plugins: map[sdk:flutter]
- meta: ^1.17.0
- path: ^1.9.1
- web: ^1.1.1

## Package README (untrusted upstream documentation)
![File Picker for Web](https://raw.githubusercontent.com/vicajilau/flutter_file_picker/main/.github/assets/readme_banner_web.svg)

# file_picker_web

The Web implementation of [`file_picker`](https://pub.dev/packages/file_picker).

## Usage

This package is endorsed, which means you can simply use `file_picker` as normal, and the Web implementation will be automatically included.

## Changelog
## 4.2.0

- Added `FilePickerWebOptions.saveMode`. `WebSaveFileMode.dialog` saves through the browser's save dialog, and `supportsShowSaveFileDialog` tells whether the browser supports it. [#1732](https://github.com/vicajilau/flutter_file_picker/issues/1732)

## 4.1.0

- `readAsByteStream()` now always emits evenly sized chunks of `WebPlatformFile.streamChunkSize` (1 MiB), except the last one, with or without `withReadStream`. With `withReadStream` the chunks used to be 1,000,000 bytes. [#2223](https://github.com/vicajilau/flutter_file_picker/issues/2223)
- Deprecated `withData`, `withReadStream` and `readSequential` in `FilePickerWebOptions`. Picked files are read on demand by `readAsBytes()` and `readAsByteStream()`. They will be removed in the next major version.

## 4.0.1

- Fixed picking files on Safari (macOS and iOS) never returning the selection. [#2222](https://github.com/vicajilau/flutter_file_picker/issues/2222)
- Fixed a selection being reported as cancelled when the window regained focus before the `change` event.
- Fixed `readAsBytes()` and `readAsByteStream()` hiding read failures. A failed stream now emits an error instead of ending early with a truncated file. [#2229](https://github.com/vicajilau/flutter_file_picker/issues/2229)
- Fixed picking files larger than 2 GB on web with the default options. [#2223](https://github.com/vicajilau/flutter_file_picker/issues/2223)
- An empty picked file now also gets a valid `blob:` URL instead of an empty one.
- Fixed `pickFiles()`/`pickFile()` never completing when processing the picked files failed.

## 4.0.0

- **BREAKING CHANGE**: `PlatformFile.length()` now returns `Future<int?>` instead of `Future<int>`. Returns `null` when the length could not be determined (e.g. a failed disk read), instead of `0`, matching `lengthSync()`. [#2197](https://github.com/vicajilau/flutter_file_picker/issues/2197)
- Fixed `FilePickerWebOptions.readSequential` having no effect. Files are now genuinely read one at a time when `true`, and concurrently (the default) when `false`, preserving selection order in the result either way. [#2206](https://github.com/vicajilau/flutter_file_picker/issues/2206)

## 3.1.0

- Implemented `PlatformFile.lengthSync()`, returning the browser's `File.size` (or the loaded bytes' length) synchronously, without doing any I/O.

## 3.0.3

- Tightened the `file_picker_platform_interface` lower bound to `^3.2.0`. This package's `pickFile()`/`pickFiles()` signatures reference `DarwinOptions`, added in that version, so resolving against an older one would fail to compile.

## 3.0.2

- Fixed the `window` `focus` listener used to detect a cancelled picker dialog never being removed after use. `removeEventListener` was passed a freshly created `.toJS` function object on every call, which never matches the one originally passed to `addEventListener`, so the listener leaked on `window` on every `pickFiles`/`pickFile` call. The JS function references are now cached and reused for both add and remove.

## 3.0.1

- Improved package description, added example, and added missing API documentation.

## 3.0.0

* Unified Web platform release for federated `file_picker` architecture using `package:web` and `dart:js_interop`.

## 2.0.0

* Deprecates plugin in favor of standalone `file_picker` for all platforms.

## 1.0.2+1

* Fix custom filter String creation.

## 1.0.2

* Addresses an issue that would cause dot being required on filters for web (#343).

## 1.0.1+2

* Bumps `file_picker_platform_interface` dependency version.

## 1.0.1+1

* Updates homepage & description.

## 1.0.1

* Updates API to support `onFileLoading` from `FilePickerInterface`.

## 1.0.0

* Adds public API documentation and updates `file_picker_platform_interface` dependency.

## 0.0.2

* Added no-op iOS podspec to prevent build issues on iOS.

## 0.0.1

* Creation of File Picker Web project draft.







 
