java - S3 Presigned Url Callback -
is there way know if has uploaded generated public presigned url of s3? callback trigger servlet.
for example:
i created presigned url docs
amazons3 s3client = new amazons3client(new profilecredentialsprovider()); java.util.date expiration = new java.util.date(); long msec = expiration.gettime(); msec += 1000 * 60 * 60; // add 1 hour. expiration.settime(msec); generatepresignedurlrequest generatepresignedurlrequest = new generatepresignedurlrequest(bucketname, objectkey); generatepresignedurlrequest.setmethod(httpmethod.put); generatepresignedurlrequest.setexpiration(expiration); url url = s3client.generatepresignedurl(generatepresignedurlrequest); // use pre-signed url upload object.
then, give url
, if upload url
, http://example.com/upload
invoked data uploaded file.
you can use s3 event notifications generate notification. @ objectcreated
event. notifications can filtered s3 prefix. (there samples in aws documentation on linked page.)
Comments
Post a Comment