Flatfile Embeds moves the hard work of importing data to the server, providing more consistent performance and reliability for all users no matter the hardware they're working with.
This guide aims to provide basic instructions to get you up and running with Flatfile's new Embeds.
If you haven't already, you need to create a data template. Before you can upload data, you need to tell Flatfile what that data is supposed to look like, and data templates are how. You can create new data templates in two ways: manually or automatically from a .csv.
Creating a Flatfile Embed is simple.
Clicking Create will take you to the Edit Embed page. Here, you can rename the Embed, see the Embed ID and Private Key (which only appears once! You should save it now.), and see some example code snippets for the languages we support.
Flatfile uses JSON Web Tokens (JWTs) to authenticate uploads and allow users to resume where they've left off in case of an interruption. The Node.js example we provide shows one way to generate JWTs on your server (you will need the
jsonwebtoken dependencies), but if you would like more information about how it works and how it can be customized, check out our SDK documentation.
The front end is where the hard work of creating a JWT pays off. Previous iterations of Flatfile required front-end adapters for the various frameworks we supported, but now all you need is the Flatfile SDK. There's no complicated configuration, adapters, or head-scratching front-end code to write. All the hard work is done on the server, so all you need to do is:
And that's it! The code snippet in the Edit Embed page shows a basic outline of how it works, but since all you need from us is the SDK, you can code your front end in just about any framework you like.