deenasun commited on
Commit
5dbc0a1
·
1 Parent(s): ce87886

add inline content disposition for video upload

Browse files
Files changed (1) hide show
  1. app.py +6 -2
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={'ACL': 'public-read', 'ContentType': 'video/mp4'}
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://', '')