six7 / figma-assets-generator

Creates assets (SVG, JPG, PNG) from a figma document (e.g. a "Icons" page in one of your files) and places them locally in a folder.
90 stars 10 forks source link

How to get the fileID? #4

Closed fernandofas closed 4 years ago

fernandofas commented 4 years ago

Hi there,

This package is really promising and the only thing that is not clear on this concept is where to find the fileID.

If you could explain detailed where we users could find it will be great.

Kind regards,

Fernando Fas

six7 commented 4 years ago

I agree, it's currently a little unclear on how to get the file id. I'll add a section in the readme on where to find it.

To get the fileId you need to open the document in your browser, the fileId is indicated in the address bar:

https://www.figma.com/file/KiFw6W2QjnKqhA4hoWsrhQ/Untitled?node-id=0%3A123

The part after /file/ would be the fileId (in this example KiFw6W2QjnKqhA4hoWsrhQ) and the documentId would be the part after node-id= (in this example 0%3A123 - however %3A is just HTML Encoding for : so the document id would be 0:123