Skip to content

Support reading large files #20

@yagudaev

Description

@yagudaev

Many of the community files are large .fig files. For example take this file: https://www.figma.com/community/file/1325597018063319916/free-dark-admin-dashboards, it converts to a ~125MB file.

This results in a stack-overflow when we try to process it with the btoa method.

function convertBlobsToBase64(json: any): object {
  if (!json.blobs) return json

  return {
    ...json,
    blobs: json.blobs.map((blob: any) => {
      return btoa(String.fromCharCode(...blob.bytes))
    })
  }
}

There are more efficient ways to convert a blob to a Base64 we should use.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions