From 07d7c9df4b8261cf6327135c9e992295f5ba04a6 Mon Sep 17 00:00:00 2001 From: Allan Bowe Date: Tue, 6 Sep 2022 21:20:00 +0000 Subject: [PATCH] feat: adding ctype option to mv_createfile.sas macro --- all.sas | 8 ++++++-- viya/mv_createfile.sas | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/all.sas b/all.sas index 13e7291c..d017a7f6 100644 --- a/all.sas +++ b/all.sas @@ -22015,7 +22015,8 @@ run; @param [in] contentdisp= (inline) Content Disposition. Example values: @li inline @li attachment - + @param [in] ctype= (0) Set a default HTTP Content-Type header to be returned + with the file when the content is retrieved from the Files service. @param [in] access_token_var= The global macro variable to contain the access token, if using authorization_code grant type. @param [in] grant_type= (sas_services) Valid values are: @@ -22043,6 +22044,7 @@ run; ,inref= ,intype=BINARY ,contentdisp=inline + ,ctype=0 ,access_token_var=ACCESS_TOKEN ,grant_type=sas_services ,mdebug=0 @@ -22094,8 +22096,10 @@ filename &fref filesrvc folderPath="&path" filename="&name" cdisp="&contentdisp" +%if "&ctype" ne "0" %then %do; + ctype="&ctype" +%end; lrecl=1048544; - %if &intype=BINARY %then %do; %mp_binarycopy(inref=&inref, outref=&fref) %end; diff --git a/viya/mv_createfile.sas b/viya/mv_createfile.sas index 64d2f8c3..20196c82 100644 --- a/viya/mv_createfile.sas +++ b/viya/mv_createfile.sas @@ -24,7 +24,8 @@ @param [in] contentdisp= (inline) Content Disposition. Example values: @li inline @li attachment - + @param [in] ctype= (0) Set a default HTTP Content-Type header to be returned + with the file when the content is retrieved from the Files service. @param [in] access_token_var= The global macro variable to contain the access token, if using authorization_code grant type. @param [in] grant_type= (sas_services) Valid values are: @@ -52,6 +53,7 @@ ,inref= ,intype=BINARY ,contentdisp=inline + ,ctype=0 ,access_token_var=ACCESS_TOKEN ,grant_type=sas_services ,mdebug=0 @@ -103,8 +105,10 @@ filename &fref filesrvc folderPath="&path" filename="&name" cdisp="&contentdisp" +%if "&ctype" ne "0" %then %do; + ctype="&ctype" +%end; lrecl=1048544; - %if &intype=BINARY %then %do; %mp_binarycopy(inref=&inref, outref=&fref) %end;