Skip to content

When using FileReader with Upload(), if error occurs, FileSource not exposed to close the stream with? #795

@mysticmew7

Description

@mysticmew7

Question
When using FileReader, if onError occurs, the stream is not closed to allow resuming upload.
However, Upload() doesn't expose FileSource, so there doesn't seem to be a way of closing the stream with FileSource.close().
How can we close the stream on error?

Setup details

  • Runtime environment: React Native
  • Used tus-js-client version: tus-js-client@4.3.1
  • Used tus server software: Latest supabase tus server

Details
It seems the FileSource should be available so the stream / file handle can be closed on error.
Otherwise, if it never succeeds, the stream / file handle would be left open indefinitely.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions