batter / s3_cors_fileupload

A gem for Rails to allow for uploading of files to AWS-S3 via CORS using the jQuery-File-Upload
MIT License
21 stars 8 forks source link

button to delete all not working #5

Closed lymecca closed 10 years ago

lymecca commented 10 years ago

I removed the data-confirmation from the destroy button on _template_uploaded.html.erb, as methioned in notes, but, the general destroy button is not working.

batter commented 10 years ago

Really? If you open up a javascript console with Chrome or a similar browser does it show you a javascript error in the console when you click the button? I'll have to look closer later tonight when I get a chance.

lymecca commented 10 years ago

Hi Batter, I just checked it, no error msg shows up in the javascript chrome console.

batter commented 10 years ago

@lymecca - What version of the gem are you using? And are you seeing any errors in your JS console? It should work fine, but the key is that there is ajax browser request that gets made to the S3UploadsController#destroy action. That is what destroys the corresponding model instance, and then I put a callback on the SourceFile model that also deletes the object on S3 prior to deleting the object in the database. You may need to update the callback if you've swapped in Fog. You should also ensure that the controller action is not raising an error for some reason by viewing the server log.

I just tested this on my local instance with the most recent release, 0.3.0 and it seemed to work fine regardless of whether the JS-confirm dialog was present or not.

batter commented 10 years ago

@lymecca - Did it start working for you? Sorry I haven't gotten around to really stress testing it as much as I wanted to... Going to try to make some updates soon.

lymecca commented 10 years ago

@batter - No, it's not, but, no problem, by some advantages, I'm trying to migrate from S3 to Cloudinary. I am grateful for your support, thanks.