Viewing version 4.2.0. Open the latest package page.
file_picker_web
4.2.0Web platform implementation of the file_picker plugin, providing browser file selection, file streaming, and file loading.
Readme
File Picker for Web
file_picker_web
The Web implementation of 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.dialogsaves through the browser's save dialog, andsupportsShowSaveFileDialogtells whether the browser supports it. #1732
4.1.0
readAsByteStream()now always emits evenly sized chunks ofWebPlatformFile.streamChunkSize(1 MiB), except the last one, with or withoutwithReadStream. WithwithReadStreamthe chunks used to be 1,000,000 bytes. #2223- Deprecated
withData,withReadStreamandreadSequentialinFilePickerWebOptions. Picked files are read on demand byreadAsBytes()andreadAsByteStream(). 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
- Fixed a selection being reported as cancelled when the window regained focus before the
changeevent. - Fixed
readAsBytes()andreadAsByteStream()hiding read failures. A failed stream now emits an error instead of ending early with a truncated file. #2229 - Fixed picking files larger than 2 GB on web with the default options. #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 returnsFuture<int?>instead ofFuture<int>. Returnsnullwhen the length could not be determined (e.g. a failed disk read), instead of0, matchinglengthSync(). #2197 - Fixed
FilePickerWebOptions.readSequentialhaving no effect. Files are now genuinely read one at a time whentrue, and concurrently (the default) whenfalse, preserving selection order in the result either way. #2206
3.1.0
- Implemented
PlatformFile.lengthSync(), returning the browser'sFile.size(or the loaded bytes' length) synchronously, without doing any I/O.
3.0.3
- Tightened the
file_picker_platform_interfacelower bound to^3.2.0. This package'spickFile()/pickFiles()signatures referenceDarwinOptions, added in that version, so resolving against an older one would fail to compile.
3.0.2
- Fixed the
windowfocuslistener used to detect a cancelled picker dialog never being removed after use.removeEventListenerwas passed a freshly created.toJSfunction object on every call, which never matches the one originally passed toaddEventListener, so the listener leaked onwindowon everypickFiles/pickFilecall. 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_pickerarchitecture usingpackage:webanddart:js_interop.
2.0.0
- Deprecates plugin in favor of standalone
file_pickerfor 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_interfacedependency version.
1.0.1+1
- Updates homepage & description.
1.0.1
- Updates API to support
onFileLoadingfromFilePickerInterface.
1.0.0
- Adds public API documentation and updates
file_picker_platform_interfacedependency.
0.0.2
- Added no-op iOS podspec to prevent build issues on iOS.
0.0.1
- Creation of File Picker Web project draft.
Installing
export PUB_HOSTED_URL=https://pub.mirror.p-hatan.ir
flutter pub add 'file_picker_web:4.2.0'pubspec.yaml
name: file_picker_web
description: Web platform implementation of the file_picker plugin, providing browser file selection, file streaming, and file loading.
version: 4.2.0
homepage: https://github.com/vicajilau/flutter_file_picker/tree/main/packages/file_picker_web
repository: https://github.com/vicajilau/flutter_file_picker/tree/main/packages/file_picker_web
topics:
- file-picker
- web
resolution: workspace
environment:
sdk: ">=3.10.0 <4.0.0"
flutter: ">=3.38.0"
flutter:
plugin:
implements: file_picker
platforms:
web:
pluginClass: FilePickerWeb
fileName: file_picker_web.dart
dependencies:
flutter:
sdk: flutter
flutter_web_plugins:
sdk: flutter
file_picker_platform_interface: ^4.0.0
cross_file: ^0.3.5+4
meta: ^1.17.0
path: ^1.9.1
web: ^1.1.1
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^6.0.0
Version history
| Version | Published | Archive | SHA-256 |
|---|---|---|---|
| 0.0.1 | On demand | Download | 62d29b11…f2cba9 |
| 0.0.2 | On demand | Download | 32f9b4fb…257ecf |
| 1.0.0 | On demand | Download | 0b42443e…9bfa16 |
| 1.0.1 | On demand | Download | 67de945d…eb53b2 |
| 1.0.1+1 | On demand | Download | 93a58ac6…71fbe0 |
| 1.0.1+2 | On demand | Download | a5949974…351e83 |
| 1.0.2 | On demand | Download | 3933720f…13a1cf |
| 1.0.2+1 | On demand | Download | a1f762cc…476653 |
| 2.0.0 | On demand | Download | 8adec268…771aba |
| 3.0.0 | On demand | Download | 3c0d7366…953d96 |
| 3.0.1 | On demand | Download | f1af38b3…aa7eed |
| 3.0.2 | On demand | Download | 067051c4…1106f3 |
| 3.0.3 | On demand | Download | df472142…f8750b |
| 3.1.0 | On demand | Download | 935560a9…06f227 |
| 4.0.0 | On demand | Download | b3004268…ef3496 |
| 4.0.1 | On demand | Download | 8d69eb18…c8775e |
| 4.1.0 | On demand | Download | 32af8262…d59b7d |
| 4.2.0 | Cached · Upstream SHA-256 matched | Download | a2288008…6c8b8c |
Dependencies
cross_file "^0.3.5+4"
file_picker_platform_interface "^4.0.0"
flutter {
"sdk": "flutter"
}
flutter_web_plugins {
"sdk": "flutter"
}
meta "^1.17.0"
path "^1.9.1"
web "^1.1.1"