Spaces:
Running
Running
add inline content disposition for video upload
Browse files
app.py
CHANGED
@@ -85,8 +85,12 @@ def upload_video_to_r2(video_path, bucket_name="asl-videos"):
|
|
85 |
video_file,
|
86 |
bucket_name,
|
87 |
unique_filename,
|
88 |
-
ExtraArgs={
|
89 |
-
|
|
|
|
|
|
|
|
|
90 |
|
91 |
# Replace the endpoint with the domain for uploading
|
92 |
public_domain = (R2_ENDPOINT.replace('https://', '')
|
|
|
85 |
video_file,
|
86 |
bucket_name,
|
87 |
unique_filename,
|
88 |
+
ExtraArgs={
|
89 |
+
'ACL': 'public-read',
|
90 |
+
'ContentType': 'video/mp4',
|
91 |
+
'CacheControl': 'max-age=86400', # Cache for 24 hours
|
92 |
+
'ContentDisposition': 'inline' # Force inline display
|
93 |
+
})
|
94 |
|
95 |
# Replace the endpoint with the domain for uploading
|
96 |
public_domain = (R2_ENDPOINT.replace('https://', '')
|