coollsd commited on
Commit
eb6a910
·
verified ·
1 Parent(s): 5ad161e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -302,7 +302,7 @@ HTML_CONTENT = """
302
  copyBtn.textContent = 'Copy Link';
303
  copyBtn.className = 'copy-btn';
304
  copyBtn.onclick = () => {
305
- navigator.clipboard.writeText(url).then(() => {
306
  alert('Link copied to clipboard!');
307
  });
308
  };
@@ -358,6 +358,7 @@ async def handle_video_stream(path: str, request: Request):
358
 
359
  headers = dict(response.headers)
360
  headers['Access-Control-Allow-Origin'] = '*'
 
361
 
362
  if response.status_code == 206:
363
  headers['Content-Range'] = response.headers.get('Content-Range')
@@ -391,7 +392,7 @@ async def initiate_upload(cookies: Dict[str, str], filename: str, content_type:
391
  'Sec-GPC': '1',
392
  'Priority': 'u=1, i'
393
  })
394
- print(f'Initiate upload response status: {response.status_code}')
395
  print(f'Initiate upload response headers: {response.headers}')
396
  print(f'Response body: {response.text}')
397
  return response.json()
 
302
  copyBtn.textContent = 'Copy Link';
303
  copyBtn.className = 'copy-btn';
304
  copyBtn.onclick = () => {
305
+ navigator.clipboard.writeText(window.location.origin + url).then(() => {
306
  alert('Link copied to clipboard!');
307
  });
308
  };
 
358
 
359
  headers = dict(response.headers)
360
  headers['Access-Control-Allow-Origin'] = '*'
361
+ headers['Content-Disposition'] = 'inline'
362
 
363
  if response.status_code == 206:
364
  headers['Content-Range'] = response.headers.get('Content-Range')
 
392
  'Sec-GPC': '1',
393
  'Priority': 'u=1, i'
394
  })
395
+ print(f'Initiate upload response status: {response.status_code}')
396
  print(f'Initiate upload response headers: {response.headers}')
397
  print(f'Response body: {response.text}')
398
  return response.json()