Last updated 22 days ago
File to upload
File uploaded successfully
Unique identifier for the uploaded file
Original filename
Content type of the file
const form = new FormData(); form.append('file', fs.createReadStream('path/to/your/file.pdf')); const response = await fetch('https://api.getfractal.xyz/v0/files', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_TOKEN' }, body: form }); const data = await response.json();
{ "id": "123e4567-e89b-12d3-a456-426614174000", "name": "text", "type": "text" }