This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Utsav Shah
Posted Dec 14 - Read on Facebook

Has anyone managed to write to a file with a Framer prototype based on certain state values? Can anyone point me in the direction of how to write data from a prototype to a file?


Michael Weisert

What's the use case? If you're trying to capture values for user testing you could pass these to an external tool (like SurveyMonkey) to capture those. You could also likely do a call to a database somewhere. Really depends on what you're trying to accomplish.

Utsav Shah

Hi Michael Weisert. The use case is that based on the state changes of certain layers, I am storing key value pairs and animation times. Now, these key value pairs need to be written to a JSON file so that I can send it to a physical product that will produce the animations on LEDs. I am achieving the format in which the physical product (LEDs) expect the data through interactive state changes and storing and outputting the values. Do you have any suggestions ? I am not aware of a way to accomplish this with a call to a database.

Alan Travis

For the physical product... Will you send it a message with the JSON file as the payload?
Is the physical device looking for a specific file on the filesystem, named exactly fileForPhysicalDevice.json?

If it's the first then I think you can store in memory the json, and then send it in a single http request.

If it's the second, I think it's more difficult. The browser tries to keep javascript in a nice little sandbox.

Let us know and we can probably help.

Read the entire post on Facebook