Open jonadeline opened 4 years ago
Which frappe version are you using?
I'm on version 12. But I think I figured out what was wrong. It was missing some check in the key_generator function regarding the docType. That is said I simplified this function as I just wanted my files to be uploaded at the root of my bucket so I ended up with this :
def key_generator(self, file_name, parent_doctype, parent_name):
"""
Generate keys for s3 objects uploaded with file name attached.
"""
file_name = file_name.replace(' ', '_')
file_name = self.strip_special_chars(file_name)
key = ''.join(
random.choice(
string.ascii_uppercase + string.digits) for _ in range(8)
)
final_key = key + "_" + file_name
return final_key
Expected behaviour
Import all existing attachments to S3
Actual behaviour
Error message
Step to reproduce
Click "Migrating existing files" button
Version
Latest
Traceback (most recent call last):