SFTP File Upload
upload files securely and efficiently to your Space
This feature is available only for Projects.
For more information or to upgrade your plan, please reach out to Support.
SFTP Process
Flatfile’s SFTP upload process allows you to transfer files directly into your Flatfile space using the industry-standard SFTP protocol. SFTP uploads are ideal for automated processes or handling very large files.
When you upload a file to Flatfile using SFTP, our system initiates a secure, automated workflow. The file is first transferred to our SFTP server using industry-standard encryption protocols, then seamlessly moved into your destination Space, and finally removed from the SFTP server once the transfer is confirmed successful.
Obtaining Credentials
Uploading files via SFTP requires credentials. You can obtain these credentials from the Files tab in your destination Space or from the API.
Each space has its own unique set of credentials that cannot be shared or used with other spaces. Keep these credentials secure and never share them in public forums or repositories.
From Your Files Page
-
In the destination Space, navigate to the Files tab.
-
Click Get SFTP Credentials.
If Get SFTP Credentials is not visible, please reach out to Support to enable Projects.
- Save your credentials to a secure location.
From the API
- Obtain your Secret Key from the API Keys page.
- Obtain your Space ID from the Spaces list or the url of your Space.
- Make an authenticated request to the sftp-credentials endpoint.
- Save your credentials to a secure location.
SFTP Connection
The command line provides a direct way to facilitate SFTP transfers, though other free and open-source SFTP clients are available.
Uploading Files
-
Navigate to the directory containing the file you want to upload.
-
From that directory, connect to the SFTP server.
On your first connection you will be prompted to verify the host key.
- When prompted, enter your password.
- Upload a file.
As the file uploads, your terminal will display the progress of the upload.
Flatfile accepts files up to 100 MB. If you need to upload larger files, please reach out to Support.
- Close the connection.
Troubleshooting
If you encounter issues while connecting to the SFTP Server, here are some common error messages and their solutions.
Error Message | Solution |
---|---|
Connection refused | Check your firewall settings and ensure port 22 is open. |
Authentication failed | Verify your credentials haven’t expired, refetch credentials if necessary. |
Permission denied | Confirm you’re using the correct credentials for the destination Space. |
Host key verification failed | Confirm the host key when prompted to verify. |
For operational efficiency, this process can be automated through scripting to minimize manual intervention.