Skip to main content

Reusing Spaces

During the configuration of embedded Flatfile, you have the flexibility to either reuse an existing Space or generate a new one. These properties come into play when you’re working with an already established Space.

space

{id: string, accessToken: string}
required
Using your secret key, you’ll make a request to a server endpoint to retrieve an accessToken.
src/client.js

Overrides

mountElement

string
default:"flatfile_iFrameContainer"
The element Flatfile will mount to. (Will create if it doesn’t already exist.)
src/client.js

loading

ReactElement
A default loading state when the Space is loading. Optionally, you can override the default Loading component.

exitTitle

string
default:"Close Window"
The title on the dialog that appears when exiting out of Flatfile.
src/client.js

exitText

string
default:"See below"
The text on the dialog that appears when exiting out of Flatfile.Default: “Are you sure you would like to close this window? This will end your current data import session.”
src/client.js

exitPrimaryButtonText

string
default:"Yes, exit"
The text on the dialog primary button that appears when exiting out of Flatfile.
src/client.js

exitSecondaryButtonText

string
default:"No, stay"
The text on the dialog secondary button that appears when exiting out of Flatfile.
src/client.js

errorTitle

string
default:"Something went wrong"
The title on the dialog that appears when an unexpected error occurs when loading Flatfile. Note: the error dialog will also include error details regarding the error that occurred.
src/client.js

iframe styles

Theming within the Flatfile application is done in an event listener.
The CSS here is for styling how you want things to look outside of the Flatfile iframe, like the exit dialog, the error container, and the dialog wrapper. This css can go in your style.css in your public folder. Remember to use !important to override values.
public/styles.css

On Premises

For customers hosting on-premises, the following variables apply.

apiUrl

string
default:"https://platform.flatfile.com/api"
The endpoint used to interact with the Flatfile API
src/client.js

spaceUrl

string
default:"https://spaces.flatfile.com"
The URL for accessing the Flatfile Spaces API.
src/client.js