Support up to 25 attachments (#428)

This commit is contained in:
Kerem Yilmaz
2024-06-05 20:43:11 -07:00
committed by GitHub
parent b4e95d29ce
commit 527f57a68e

View File

@@ -673,9 +673,9 @@ class UploadToS3Block(Block):
client = self.get_async_aws_client()
# is the file path a file or a directory?
if os.path.isdir(self.path):
# get all files in the directory, if there are more than 10 files, we will not upload them
# get all files in the directory, if there are more than 25 files, we will not upload them
files = os.listdir(self.path)
if len(files) > 10:
if len(files) > 25:
raise ValueError("Too many files in the directory, not uploading")
for file in files:
# if the file is a directory, we will not upload it