From 921186eb74d65137e8e44807328fc30ea95ee17e Mon Sep 17 00:00:00 2001 From: munja Date: Thu, 3 Feb 2022 20:17:43 +0100 Subject: [PATCH] fix: adding images to mp_streamfile.sas --- all.sas | 11 +++++++++++ base/mp_streamfile.sas | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/all.sas b/all.sas index fc76ccf..f36957a 100644 --- a/all.sas +++ b/all.sas @@ -10869,6 +10869,17 @@ run; contentdisp="attachment; filename=&outname"; %end; %end; +%else %if &contentype=GIF or &contentype=JPEG or &contentype=PNG %then %do; + %if &platform=SASMETA and &streamweb=1 %then %do; + data _null_; + rc=stpsrv_header('Content-type',"image/%lowcase(&contenttype)"); + run; + %end; + %else %if &platform=SASVIYA %then %do; + filename &outref filesrvc parenturi="&SYS_JES_JOB_URI" + contenttype="image/%lowcase(&contenttype)"; + %end; +%end; %else %if &contentype=HTML %then %do; %if &platform=SASVIYA %then %do; filename &outref filesrvc parenturi="&SYS_JES_JOB_URI" name="_webout.json" diff --git a/base/mp_streamfile.sas b/base/mp_streamfile.sas index 3c52f94..9d3a65c 100644 --- a/base/mp_streamfile.sas +++ b/base/mp_streamfile.sas @@ -81,6 +81,17 @@ run; contentdisp="attachment; filename=&outname"; %end; %end; +%else %if &contentype=GIF or &contentype=JPEG or &contentype=PNG %then %do; + %if &platform=SASMETA and &streamweb=1 %then %do; + data _null_; + rc=stpsrv_header('Content-type',"image/%lowcase(&contenttype)"); + run; + %end; + %else %if &platform=SASVIYA %then %do; + filename &outref filesrvc parenturi="&SYS_JES_JOB_URI" + contenttype="image/%lowcase(&contenttype)"; + %end; +%end; %else %if &contentype=HTML %then %do; %if &platform=SASVIYA %then %do; filename &outref filesrvc parenturi="&SYS_JES_JOB_URI" name="_webout.json"