I get files from an external webservice and have to upload them to Amazon S3 via apex. I found the unmanaged package Force.com for Amazon Web Services a.k.a Amazon toolkit, but it looks rather outdated (SOAP instead of REST, incomplete code). I also don't want to use a paid app from the app exchange.
My use case is just uploading single files that I have in memory to S3. I don't want to create buckets, delete files etc. There is no visualforce involved.
Are there other code examples or packages available that I could use?
More context if necessary: In an external applciation, users can upload files. These files are passed on to Salesforce using a custom rest service. To store these files, we use the app S-Drive, which allows uploading and downloading files to Amazon S3 on managed Visualforce pages. To upload files using apex, you have to
- Initialize the upload using the S-Drive API.
- Actually upload the file to S3 directly, using parameters you get from step 1.
- Finalize the upload using the S-Drive API.
I need help with step 2.