# File Upload 🟢

## Goals

* Work with a standard webflow form&#x20;
* Support file posting to;
  * Webflow ( with business plan )&#x20;
  * Basin&#x20;
  * UploadCare ( future )&#x20;
* Support click or drag-drop to add files&#x20;
* Allow single or multiple files&#x20;
* Support constraints&#x20;
  * File type
  * File count
  * File size&#x20;

Max file upload size\
<https://discourse.webflow.com/t/change-form-file-upload-maximal-file-size/94846/11>

Single-file v. Multi-file?&#x20;

File type constraints?&#x20;

## Usage

Drop into a Webflow form.&#x20;

{% hint style="warning" %}
You must have `enctype="multipart/form-data"` on the `<form>`. Without it, the browser submits as `application/x-www-form-urlencoded` and drops file contents.&#x20;
{% endhint %}

## Technical Notes

Implemented as a Code Component.&#x20;

## Styling&#x20;

```
  --cc-formfile-border-color: #059669;
  --cc-formfile-border-thickness: 2px;
  --cc-formfile-background-color: #f8fafc;
  --cc-formfile-hover-background-color: #ecfdf5;
```
