How to upload to uploadcare?
See original GitHub issueHello, after message to this awesome file uploader, he told me to post there.
Actually, I’m using this for upload to uploadcare server, which works:
pond.on('addfile', (error, file) => {
if (error) {
console.log('Oh no');
return;
}
console.log('File added', file);
var fileup = uploadcare.fileFrom('object', file.file);
And I was trying to get the progress bar of the upload, after asking to Rik, he told me better not use addfile for upload instead server.
But after checking server I have even more doubts…
This is the uploadcare rest doc: https://uploadcare.com/docs/api_reference/rest/requests_auth/ EDIT:
FilePond.setOptions({
server: {
//url: 'https://api.uploadcare.com/',
process: {
url: 'https://upload.uploadcare.com/base/',
method: 'POST',
withCredentials: false,
headers: {
"Content-Type": "application/json"
},
timeout: 7000,
onload: null,
onerror: null
}
}
I’m using this configuration, but i’m having this error: POST https://upload.uploadcare.com/base/ 403 () But with post-man works good… In postman i add a param in the body: UPLOADCARE_PUB_KEY: demopublickey
But i don’t see where send body params in the server string.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7
Top Results From Across the Web
Uploading with Uploadcare
Uploadcare provides powerful File Uploader and Upload API for your website or app with no hassle.
Read more >Quick start - Uploadcare
Uploadcare provides companies with simple, powerful, developer-friendly building blocks to handle file uploading, processing, and delivery.
Read more >The complete guide to implementing file uploading - Uploadcare
Discover everything you need to know to implement file uploading capabilities in your app or website and collect images, videos and docs ...
Read more >Docs File uploader - Uploadcare
Uploadcare File Uploader is a responsive and mobile-ready HTML5 website solution that allows users to select and upload multiple files from various sources....
Read more >How to transfer your files to Uploadcare
This guide will help you copy your files from anoher storage to Uploadcare with the help of our Migro tool.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The snippet I posted is an example from the docs, you’ll have to complete it. I’m planning to update the docs with a working custom implementation soon.
I don’t have any experience with uploadcare but by looking at the docs I would suspect the custom process funciton would look something like this:
Still trying to implement just a “body” param, nothing…
I found this: https://github.com/pqina/filepond/issues/58 but there’s a thousand more data than what I need.
Which actually works, because it starts the upload, and it goes to 100% but I need send the file in body param.