flask-admin-s3-upload icon indicating copy to clipboard operation
flask-admin-s3-upload copied to clipboard

remove storage_type_field and bucket_name_field

Open oeN opened this issue 8 years ago • 0 comments

Hi,

I have removed the storage_type_field and the bucked_name_field and used self.storage_type and self.bucket_name instead.

Maybe I have misunderstood the purpose of these two field but the deletion of the files on S3 doesn't work because these lines returns an empty string:

storage_type = getattr(obj, self.storage_type_field, '')
bucket_name = getattr(obj, self.bucket_name_field, '')

Instead using self.storage_type and self.bucket_name returns the values we need.

Let me know if I misunderstood the behavior 😄

oeN avatar Oct 05 '16 08:10 oeN