uploadFile abstract method

Future<UploadResult> uploadFile(
  1. String resourceKey,
  2. String field, {
  3. required List<int> bytes,
  4. required String filename,
})

POST /{resource}/upload — uploads a file for a single-file upload field. field is the field's statePath, so a nested field is addressable.

Fails with UploadFailed rather than throwing, including when the host's transport has not implemented the optional FilamentUploadTransport port — the same never-throw contract every other write has.

Implementation

Future<UploadResult> uploadFile(
  String resourceKey,
  String field, {
  required List<int> bytes,
  required String filename,
});