mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-06-22 08:38:13 +02:00
feat: add redial option in campaigns
This commit is contained in:
parent
79116e6af2
commit
7fab959e26
14 changed files with 998 additions and 58 deletions
|
|
@ -64,14 +64,29 @@ class S3FileSystem(BaseFileSystem):
|
|||
) as s3_client:
|
||||
params = {"Bucket": self.bucket_name, "Key": file_path}
|
||||
|
||||
# Make transcripts viewable inline in the browser when requested
|
||||
if force_inline and file_path.endswith(".txt"):
|
||||
params.update(
|
||||
{
|
||||
"ResponseContentType": "text/plain",
|
||||
"ResponseContentDisposition": "inline",
|
||||
}
|
||||
)
|
||||
# Make artifacts viewable inline in the browser when requested
|
||||
if force_inline:
|
||||
if file_path.endswith(".txt"):
|
||||
params.update(
|
||||
{
|
||||
"ResponseContentType": "text/plain",
|
||||
"ResponseContentDisposition": "inline",
|
||||
}
|
||||
)
|
||||
elif file_path.endswith(".wav"):
|
||||
params.update(
|
||||
{
|
||||
"ResponseContentType": "audio/wav",
|
||||
"ResponseContentDisposition": "inline",
|
||||
}
|
||||
)
|
||||
elif file_path.endswith(".mp3"):
|
||||
params.update(
|
||||
{
|
||||
"ResponseContentType": "audio/mpeg",
|
||||
"ResponseContentDisposition": "inline",
|
||||
}
|
||||
)
|
||||
|
||||
url = await s3_client.generate_presigned_url(
|
||||
"get_object",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue