Support up to 25 attachments (#428)
This commit is contained in:
@@ -673,9 +673,9 @@ class UploadToS3Block(Block):
|
|||||||
client = self.get_async_aws_client()
|
client = self.get_async_aws_client()
|
||||||
# is the file path a file or a directory?
|
# is the file path a file or a directory?
|
||||||
if os.path.isdir(self.path):
|
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)
|
files = os.listdir(self.path)
|
||||||
if len(files) > 10:
|
if len(files) > 25:
|
||||||
raise ValueError("Too many files in the directory, not uploading")
|
raise ValueError("Too many files in the directory, not uploading")
|
||||||
for file in files:
|
for file in files:
|
||||||
# if the file is a directory, we will not upload it
|
# if the file is a directory, we will not upload it
|
||||||
|
|||||||
Reference in New Issue
Block a user