Hey folks,
Been fighting with this for a while and tempted to give up with spaces. I am trying to post a file into my space from either my Unity application (preferable) or from my server directly which is running on Java.
The AWS SDK is broken for Unity, which is why I turned to Digital Ocean in the first place, and now finding it pretty disheartening to see AWS SDK’s being used as the answer for posting to spaces.
Anyway, I am seem to be closest in posting from the server, since I managed to post to S3 from it, but its just giving me horrible unhelpful errors of ‘Invalid Argument’. Well that is great, which one is invalid :P
This is the code I am currently using:
awsS3credentials = new AWSStaticCredentialsProvider(new BasicAWSCredentials(Settings.S3AccessKey, Settings.S3SecretKey));
awsS3client = AmazonS3ClientBuilder.standard()
.withCredentials(awsS3credentials)
.withEndpointConfiguration(new EndpointConfiguration("nyc3.digitaloceanspaces.com", "nyc3"))
.build();
PutObjectRequest put = new PutObjectRequest(Settings.BucketName, fileName, new ByteArrayInputStream(data), metadata);
awsS3client.putObject(put);
I have ensured that my bucket name is my spaces name and that the keys are the correct ones from DO. Any ideas?
The code is basically taken from this thread: Link but my error is different.
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!
I am facing the same problem, Did anyone resolve this or Digital Ocean is not sure about the solution?
This comment has been deleted
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.