File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
qiita_pet/handlers/cloud_handlers Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,8 @@ def get(self, requested_filepath):
5050 # We indirectly infer this by looking for the "X-Forwarded-For" header,
5151 # which should only exists when redirectred through nginx.
5252 if self .request .headers .get ('X-Forwarded-For' ) is None :
53- self .set_header ('Content-Disposition' ,
53+ self .set_header (
54+ 'Content-Disposition' ,
5455 'attachment; filename=%s' % os .path .basename (filepath ))
5556 with open (filepath , "rb" ) as f :
5657 self .write (f .read ())
@@ -60,7 +61,8 @@ def get(self, requested_filepath):
6061 # base_data_dir, '/protected/' by default
6162 protected_filepath = filepath .replace (basedatadir , '/protected' )
6263 self .set_header ('X-Accel-Redirect' , protected_filepath )
63- self .set_header ('Content-Disposition' ,
64+ self .set_header (
65+ 'Content-Disposition' ,
6466 'attachment; filename=%s' % os .path .basename (
6567 protected_filepath ))
6668
You can’t perform that action at this time.
0 commit comments