Is it possible to set Amazon S3 CORS programmatically (from Apex)?
I'm coming up with a salesforce (force.com) app that allows to upload files from salesforce to amazon s3 (using drag and drop feature).
As part of setup for this app, I'm asking user to create bucket first (which I've handled programmatically ie user clicks a button and via API bucket is created) and next step is to enable CORS for this bucket, which I'm not able to do programmatically. Is it possible to set Amazon S3 CORS programmatically (from Apex) ?
As of now, I have to ask user to manually login to S3, find bucket, edit properties and save CORS which is a tedious process and will be hard for any business/admin user.
Any help in this direction will be greatly appreciated!