Upload Flow
Learn how EDS handles large file uploads through its 2-step resumable process.
The Challenge
Platform like Vercel have a 4.5MB request body limit for serverless functions. To support uploading files of several gigabytes, EDS bypasses the server by streaming data directly from the client to Google Drive.
High-Level Overview
1. Client Requests Upload URL (Client -> EDS API) 2. EDS Selects Node & Gets Google Upload URL (EDS API -> Google API -> EDS API) 3. Client Uploads Binary Data Directly (Client -> Google Drive) 4. EDS Records File metadata (EDS Internal Check)
Step 1: Initialization
The client sends the file name, size, and MIME type to EDS. EDS then:
- Finds an available storage node with enough space.
- Creates a Reservation to guarantee the space isn't taken by another upload.
- Requests a "Resumable Upload Session" from Google Drive.
- Returns a unique
uploadUrlto the client.
Step 2: Binary Transfer
The client performs an HTTP PUT request to the uploadUrl.
- Data goes directly to Google's servers.
- It does not pass through Vercel or your backend.
- Supports pausing and resuming (handled by Google).
Step 3: Finalization
Once Google confirms the transfer is complete:
- The file is recorded in the EDS database.
- The internal reservation is released.
- The file becomes visible in the dashboard.
External API Flow
When using the External Developer API, the flow is identical. Your script or application acts as the client. See the API Upload documentation for implementation details.