Skip to content

libraryAPI.getFile tries to put the entire file into a string, which fails due to size limits #164

@justarandomgeek

Description

@justarandomgeek

when getFile downloads a video file, it tries to return the file contents in a string. This is a problem for several reasons:

  1. Video files are very large, and really shouldn't be fetched in-memory anyway, but streamed directly to some destination.
  2. Video files tend to be larger than the max string size, so this fails anyway, even if there is sufficient memory for it.
  3. Video files are not text, and thus should not be in strings. This applies to several other methods as well, such as all of the image section of the api. These things should be returned in Buffers or in Streams, ideally giving the consumer the choice. If they can only be one, they should be Streams.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions