Skip to content
This repository has been archived by the owner on Aug 30, 2023. It is now read-only.

imageRef is incorrect #18

Open
HZ-labs opened this issue Sep 4, 2019 · 0 comments
Open

imageRef is incorrect #18

HZ-labs opened this issue Sep 4, 2019 · 0 comments

Comments

@HZ-labs
Copy link

HZ-labs commented Sep 4, 2019

this code does not work

function imageURL(hash) {
  const squash = hash.split('-').join('');
  return `url(https://s3-us-west-2.amazonaws.com/figma-alpha/img/${squash.substring(0, 4)}/${squash.substring(4, 8)}/${squash.substring(8)})`;
}

because

A reference to an image embedded in the file. To download the image using this reference, use the GET file images endpoint to retrieve the mapping from image references to image URLs

Do you have endpoint for getting single file?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant