Whether you're importing assets to the CMS or to your site assets, a large set of files is difficult o import manually.
In CMS imports in particular, you'll typically use CSV or the API to handle the record imports. However to do this you must first host the files, and supply URLs where they can be accessed.
Hosting files for import
While it's possible to setup an Amazon S3 bucket and upload all of your files somewhere, it's a slow and arduous process.
We prefer to handle it locally-
- Place all of the files even many thousands, in a local hard drive directory
- Setup a simple webserver to serve files from that directory to e.g. localhost:8000
- Setup a tunnel between the local machine and a server that can then publish this specific directory to the world
From there, Webflow can access all of the files as URLs, and you can include them in your CSV imports, or reference them using Webflow's MCP.
There are several technologies for this like ngrok however we prefer Cloudflare Tunnel for this. It's simple to setup, free, secure, easily reusable, and it automatically handles the certificate.
Prerequisites
To use Cloudflare, you'll need a domain name that you can configure on Cloudflare's DNS. It does not need to be the domain name of the site you're importing to.
Setup your Cloudflare account ( free ) and add your desired domain to it using its free DNS services.
For our purposes, we simply use our Agency's domain sygnal.com
on Cloudflare for this setup.
Setup
Configure the Tunnel
This is done in your Cloudflare account, you'll find Tunnels under the Zero Trust menu.
During tunnel setup you'll be given the exact cloudflared command to use including the TOKEN. You'll also specify what webserver to use. We recommend something generic that you don't normally use, like localhost:8000
.
Run Cloudflared
On your local machine, run the full command you're given to create the tunnel.
cloudflared.exe service install <TOKEN>
Launch the Webserver
Go to the specific directory you want to serve and launch a command prompt.
Then launch a python server from that directory.
python -m http.server 8000
Preparing files
Make sure to consider;
- File types
- File maximum sizes
- Filenames. Webflow is strict on over-long filenames, which may not be an issue with URL imports.