@@ -560,7 +560,7 @@ async def view_image(request):
560560 buffer .seek (0 )
561561
562562 return web .Response (body = buffer .read (), content_type = f'image/{ image_format } ' ,
563- headers = {"Content-Disposition" : f"attachment; filename=\" { filename } \" " })
563+ headers = {"Content-Disposition" : f"filename=\" { filename } \" " })
564564
565565 if 'channel' not in request .rel_url .query :
566566 channel = 'rgba'
@@ -580,7 +580,7 @@ async def view_image(request):
580580 buffer .seek (0 )
581581
582582 return web .Response (body = buffer .read (), content_type = 'image/png' ,
583- headers = {"Content-Disposition" : f"attachment; filename=\" { filename } \" " })
583+ headers = {"Content-Disposition" : f"filename=\" { filename } \" " })
584584
585585 elif channel == 'a' :
586586 with Image .open (file ) as img :
@@ -597,7 +597,7 @@ async def view_image(request):
597597 alpha_buffer .seek (0 )
598598
599599 return web .Response (body = alpha_buffer .read (), content_type = 'image/png' ,
600- headers = {"Content-Disposition" : f"attachment; filename=\" { filename } \" " })
600+ headers = {"Content-Disposition" : f"filename=\" { filename } \" " })
601601 else :
602602 # Use the content type from asset resolution if available,
603603 # otherwise guess from the filename.
@@ -614,7 +614,7 @@ async def view_image(request):
614614 return web .FileResponse (
615615 file ,
616616 headers = {
617- "Content-Disposition" : f"attachment; filename=\" { filename } \" " ,
617+ "Content-Disposition" : f"filename=\" { filename } \" " ,
618618 "Content-Type" : content_type
619619 }
620620 )
0 commit comments