Posting to Space (In Unity or Java)

February 1, 2018 1.5k views
Ubuntu 16.04 Java

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()
                        .withEndpointConfiguration(new EndpointConfiguration("", "nyc3"))

PutObjectRequest put = new PutObjectRequest(Settings.BucketName, fileName, new ByteArrayInputStream(data), metadata);


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.

3 Answers

I am facing the same problem, Did anyone resolve this or Digital Ocean is not sure about the solution?

Hi, did anyone resolve the above issue?

Have another answer? Share your knowledge.