-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
S3 Delete #84
Comments
This is what i'm doing now (coffeescript)
|
I don’t think I’ve ever had a delete function for it. — On Thu, Aug 27, 2015 at 4:25 PM, Michael Mitchell
|
Any update for this issue ? |
I haven't had time to look into this. |
Do you have any idea how you want to implement it ? I would be interested in participating. |
@ValentinTrinque this could be as simple as something like this /**
* Deletes an S3 Asset
* @param asset
*/
deleteAsset(asset) {
// You'll need to sign this somewhere, or have open permissions on your bucket - not recommended
const url = `https://${asset.get('bucket')}.s3.amazonaws.com/${asset.get('key')}`;
return this.get('ajax').delete(url).then(() => {
asset.destroyRecord();
});
}, Assumes your asset is the response from uploading, something like import DS from 'ember-data';
export default DS.Model.extend({
name: DS.attr('string'),
location: DS.attr('string'),
bucket: DS.attr('string'),
key: DS.attr('string'),
eTag: DS.attr('string'),
}); |
@peavers I am not working on the project with requiring this. However, thank you for the tip. |
This library used to have an asset delete function for s3 didnt it? How can that be accomplished now?
The text was updated successfully, but these errors were encountered: