Amazon WorkDocs - API for document download - amazon-web-services

With the Amazon WorkDocs API [1] I can list folders and files, create and delete folders, upload and delete files. But it seems there is no way to download a file.
The GetDocument API [2] returns a JSON document which includes a 'DownloadUrl' element but it is always 'null'. Also this 'DownloadUrl' element is not exposed in the SDK. I'm using the C++ SDK.
Is this by design?
[1] https://docs.aws.amazon.com/workdocs/latest/APIReference/Welcome.html
[2] https://docs.aws.amazon.com/workdocs/latest/APIReference/API_GetDocument.html

Here is an example of how to download a document from Amazon WorkDocs using the API. This example is implemented in Java; however, it shows you how to perform this task. As you see, an URL object plays a role in downloading the document.
https://github.com/awsdocs/aws-doc-sdk-examples/blob/master/javav2/example_code/workdocs/src/main/java/com/example/workdocs/DownloadUserDoc.java

Related

can I copy a file from Sharepoint to AWS S3?

Is it possible to copy a file from Sharepoint to s3? Preferably coding it from the AWS side.
I've searched but not seeing much out there. There's a similar title but this doesn't answer the question:
upload files from sharepoint online to aws s3 bucket
It is possible for sure. SharePoint online has a rest API I use a python package called office365, it implements a SharePoint client to handle most of the daily operations you will need.
The repo is: https://github.com/O365/python-o365
Some tips about I have struggled for the first time:
The ClientContext object requires the base site URL for the SharePoint library you want to authenticate, library doc:
https://mysharepoint.mydomain.com/sites/mysite/shareddocuments/
The URL you must pass to the Client context will be: https://mysharepoint.mydomain.com/sites/mysite
The method UserCredential requires your user in the following format: user#mydomain

How to use AWS SDK cpp async API's for S3?

I wish to use the aws sdk cpp async api's for s3 in my application. However I am not able to find documentation for the same. I have been through https://github.com/awsdocs/aws-doc-sdk-examples/tree/master/cpp/example_code/s3 but there are no examples which include async api's.
For example I am trying to use the PutObjectAsync api. According the api reference guide given here https://sdk.amazonaws.com/cpp/api/LATEST/class_aws_1_1_s3_1_1_s3_client.html#aee8d39c350c5bb66a8d1edcc18df2b78 you need to form the PutObjectRequest, PutObjectResponseReceivedHandler and AsyncCallerContext.
Here I didn't understood how to form the PutObjectResponseReceivedHandler and AsyncCallerContext. Can someone please guide me through it.
The AWS Code Sample Catalog on GitHub now includes a C++ example that demonstrates how to upload a file to Amazon S3 asynchronously.
The source code can be viewed at https://github.com/awsdocs/aws-doc-sdk-examples/blob/master/cpp/example_code/s3/put_object_async.cpp

Is it possible to add a file to Google Cloud Storage from a url?

On my php server I have a list of urls that point to large files (not locally stored). These files can be hundreds of Mb so I'm looking for the best way to add them to GCS without first saving them to my server. Is this possible or will I have to save each one then upload it to GCS?
Edit
I forgot to mention the list of urls that I have is managed programatically and changes often so any solution needs to be able to be implemented without manual interaction.
If your urls are publicly reachable, you may be interested in the Transfer Service provided by Google Cloud Storage. You can provide a TSV file with a list of urls from where your files will be uploaded to the bucket of your choice. You can have a look at the service doc here for further details.

How to incorporate AWS S3 plugin into Grails app?

How do I go about integrating this S3 plugin into my grails application? The documentation is very limited.
I have it fully installed with Quartz. And I have my AWS account, policies and bucket setup.
I want to be able to upload content for my Event domain class, with the content being uploaded being exclusive for each event object.
Thank you.
The plugin you linked to looks very outdated, Last updated: 24 March 2010 and seems odd to depend on another plugin like quartz to use s3.
I would instead suggest Karman (maintained by the same person as asset-pipeline) and updated for Grails 2 & 3 https://grails.org/plugin/karman-aws?skipRedirect=true
Or you may just use the aws java sdk directly - it is straight forward api: http://docs.aws.amazon.com/AmazonS3/latest/dev/UploadObjSingleOpJava.html
This plugin is out of date.
I think it will be better to use https://grails.org/plugin/aws-sdk. This plugin supports S3 integration. You can find docs on github.

Download data sets from Amazon

I want to know if it is possible to download a portion of a public AWS data set and how to do it.
Specifically, I want to download a part from Common Crawl Corpus to do local tests.
It looks like you can. If you point your browser to the public URL provided by Amazon, you can see links for the whole sets and also for subsets.
You can download it using your browser or any S3 client tools or libraries.