const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
filename: 'document.pdf',
contentType: 'application/pdf',
name: 'Chapter 1 Notes',
folderId: '<string>',
extractImages: true,
references: [{title: 'Understanding Photosynthesis', url: 'https://example.com/article'}]
})
};
fetch('https://studyfetchapi.com/api/v1/materials/upload/presigned-url', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));