Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
How do you add credentials , it doesn’t seem to read ~/.aws/credentials. Is there a way to add them in server.js?
{ fieldname: ‘upload’, originalname: ‘audio.caf’, encoding: ‘7bit’, mimetype: ‘application/octet-stream’ } { Error: connect ETIMEDOUT 169.254.169.254:80 at Object._errnoException (util.js:1031:13) at _exceptionWithHostPort (util.js:1052:20) at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1195:14) message: ‘Missing credentials in config’, errno: ‘ETIMEDOUT’, code: ‘CredentialsError’, syscall: ‘connect’, address: ‘169.254.169.254’, port: 80, time: 2017-11-29T15:03:24.389Z, originalError: { message: ‘Could not load credentials from any providers’, errno: ‘ETIMEDOUT’, code: ‘CredentialsError’, syscall: ‘connect’, address: ‘169.254.169.254’, port: 80, time: 2017-11-29T15:03:24.388Z, originalError: { errno: ‘ETIMEDOUT’, code: ‘ETIMEDOUT’, syscall: ‘connect’, address: ‘169.254.169.254’, port: 80, message: ‘connect ETIMEDOUT 169.254.169.254:80’ } }, storageErrors: [] }
Ah ok bucket shouldn’t be the full url to the bucket just the name you’ve assigned it. https://xyz.nyc3.digitaloceanspaces.com would be ‘xyz’
There is a lot more to work on from here:
Just suggesting follow-up topics if anyone is interested.
the tutorial helped me a ton starting out with spaces and nodejs even tough my focus was more on uploading json objects from within node rather then posts.
one thing I had to google was, that if you want to put files in different folders, the folders name becomes part of the key.
in my case i have a recipes folder in my bucket so I had to Key : “recipes/” + recipeName
another thing that might be helpfull handling text documents is setting ContentType: ‘application/json’, ContentEncoding: ‘utf8’
I had follow your tutorial, but when upload to Spaces, it’s always set mimetype to 'application/octet-stream.
Lazy tutorial: literally copied from the AWS SDK documentation for credential set up. So DO now offers Windows and Mac servers does it?
Here is how to do it properly on a development environment: https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/setting-credentials-node.html
my other question is, here aws is npm package, so is it mandatory to have a aws subscription from amazon?
this is first time i use the digitalocen spaces, and i try to follow the tutorial and all work find for me. but i have an issue when sending a file that have 1mb it size, the response from server is ‘Error: Network Error’, please tell me what should i do? thanks
I’m not able to delete file in Spaces. Can you help?
Thanks, Josh
const deleteFileFromDOPromise = (fileUrl) => {
const params = {
Bucket: _Bucket_,
Key: fileUrl,
}
return new Promise((resolve, reject) => {
s3.deleteObject(params, (err, data) => {
if(err) {
reject(err);
} else {
resolve(data);
}
})
})
}