Documentation Index
Fetch the complete documentation index at: https://docs.spike.ac/llms.txt
Use this file to discover all available pages before exploring further.
Spike supports file uploads with secure S3-compatible storage.
Enable File Uploads
- Go to your form settings
- Enable “Allow File Uploads”
- Configure allowed file types and max size
Use enctype="multipart/form-data":
<form
action="https://api.spike.ac/f/YOUR_FORM_SLUG"
method="POST"
enctype="multipart/form-data"
>
<input type="text" name="name" placeholder="Name" required>
<input type="email" name="email" placeholder="Email" required>
<label for="resume">Upload Resume (PDF, max 10MB)</label>
<input type="file" id="resume" name="resume" accept=".pdf" required>
<button type="submit">Submit Application</button>
</form>
Multiple Files
<input type="file" name="attachments" multiple>
React Example
function ApplicationForm() {
const [status, setStatus] = useState('idle');
async function handleSubmit(e: React.FormEvent<HTMLFormElement>) {
e.preventDefault();
setStatus('loading');
const form = e.currentTarget;
const data = new FormData(form);
const response = await fetch('https://api.spike.ac/f/YOUR_FORM_SLUG', {
method: 'POST',
body: data, // Don't set Content-Type header - browser sets it with boundary
headers: { 'Accept': 'application/json' }
});
setStatus(response.ok ? 'success' : 'error');
}
return (
<form onSubmit={handleSubmit}>
<input type="text" name="name" required />
<input type="email" name="email" required />
<input type="file" name="resume" accept=".pdf" required />
<button disabled={status === 'loading'}>Submit</button>
</form>
);
}
Settings
| Setting | Default | Description |
|---|
| Max File Size | 10 MB | Maximum size per file |
| Allowed Types | image/*, application/pdf | MIME types or extensions |
Allowed File Types Examples
image/* # All images
application/pdf # PDF files
.doc,.docx # Word documents
image/png,image/jpeg # Specific image types
Storage Quota
Each plan has a storage limit:
| Plan | Storage |
|---|
| Free | 100 MB |
| Pro | 1 GB |
| Business | 10 GB |
View your usage in Account Settings.
Accessing Files
Files are stored securely and accessible via signed URLs. In the dashboard:
- Go to form submissions
- Click on a submission with files
- Click the file to download
Via API, file URLs are included in the submission data:
{
"data": {
"name": "John Doe",
"email": "john@example.com"
},
"files": [
{
"id": "file_abc123",
"filename": "resume.pdf",
"originalName": "John_Doe_Resume.pdf",
"mimeType": "application/pdf",
"size": 245678,
"url": "/api/files/file_abc123"
}
]
}
Security
- Files are stored in S3-compatible storage
- URLs are signed and expire after 1 hour
- File type validation on upload
- Virus scanning (Business plan)