mirror of
https://github.com/sasjs/core.git
synced 2026-01-15 20:40:05 +00:00
fix: headers in ms_createfile.sas
This commit is contained in:
17
all.sas
17
all.sas
@@ -18869,9 +18869,10 @@ run;
|
|||||||
,mdebug=0
|
,mdebug=0
|
||||||
);
|
);
|
||||||
|
|
||||||
%local fname0 fname1 boundary fname statcd msg;
|
%local fname0 fname1 fname2 boundary fname statcd msg;
|
||||||
%let fname0=%mf_getuniquefileref();
|
%let fname0=%mf_getuniquefileref();
|
||||||
%let fname1=%mf_getuniquefileref();
|
%let fname1=%mf_getuniquefileref();
|
||||||
|
%let fname2=%mf_getuniquefileref();
|
||||||
%let boundary=%mf_getuniquename();
|
%let boundary=%mf_getuniquename();
|
||||||
|
|
||||||
data _null_;
|
data _null_;
|
||||||
@@ -18895,17 +18896,25 @@ data _null_;
|
|||||||
end;
|
end;
|
||||||
run;
|
run;
|
||||||
|
|
||||||
|
data _null_;
|
||||||
|
file &fname1;
|
||||||
|
put "Content-Type: multipart/form-data; boundary=&boundary";
|
||||||
|
run;
|
||||||
|
|
||||||
%if &mdebug=1 %then %do;
|
%if &mdebug=1 %then %do;
|
||||||
data _null_;
|
data _null_;
|
||||||
infile &fname0;
|
infile &fname0;
|
||||||
input;
|
input;
|
||||||
put _infile_;
|
put _infile_;
|
||||||
|
data _null_;
|
||||||
|
infile &fname1;
|
||||||
|
input;
|
||||||
|
put _infile_;
|
||||||
run;
|
run;
|
||||||
%end;
|
%end;
|
||||||
|
|
||||||
proc http method='POST' in=&fname0 out=&fname1
|
proc http method='POST' in=&fname0 headerin=&fname1 out=&fname2
|
||||||
url="&_sasjs_apiserverurl/SASjsApi/drive/file";
|
url="&_sasjs_apiserverurl/SASjsApi/drive/file";
|
||||||
headers "Content-Type"="multipart/form-data; boundary=&boundary";
|
|
||||||
%if &mdebug=1 %then %do;
|
%if &mdebug=1 %then %do;
|
||||||
debug level=1;
|
debug level=1;
|
||||||
%end;
|
%end;
|
||||||
@@ -18913,7 +18922,7 @@ run;
|
|||||||
|
|
||||||
%let statcd=0;
|
%let statcd=0;
|
||||||
data _null_;
|
data _null_;
|
||||||
infile &fname1;
|
infile &fname2;
|
||||||
input;
|
input;
|
||||||
putlog _infile_;
|
putlog _infile_;
|
||||||
if _infile_='{"status":"success"}' then call symputx('statcd',1,'l');
|
if _infile_='{"status":"success"}' then call symputx('statcd',1,'l');
|
||||||
|
|||||||
@@ -29,9 +29,10 @@
|
|||||||
,mdebug=0
|
,mdebug=0
|
||||||
);
|
);
|
||||||
|
|
||||||
%local fname0 fname1 boundary fname statcd msg;
|
%local fname0 fname1 fname2 boundary fname statcd msg;
|
||||||
%let fname0=%mf_getuniquefileref();
|
%let fname0=%mf_getuniquefileref();
|
||||||
%let fname1=%mf_getuniquefileref();
|
%let fname1=%mf_getuniquefileref();
|
||||||
|
%let fname2=%mf_getuniquefileref();
|
||||||
%let boundary=%mf_getuniquename();
|
%let boundary=%mf_getuniquename();
|
||||||
|
|
||||||
data _null_;
|
data _null_;
|
||||||
@@ -55,17 +56,25 @@ data _null_;
|
|||||||
end;
|
end;
|
||||||
run;
|
run;
|
||||||
|
|
||||||
|
data _null_;
|
||||||
|
file &fname1;
|
||||||
|
put "Content-Type: multipart/form-data; boundary=&boundary";
|
||||||
|
run;
|
||||||
|
|
||||||
%if &mdebug=1 %then %do;
|
%if &mdebug=1 %then %do;
|
||||||
data _null_;
|
data _null_;
|
||||||
infile &fname0;
|
infile &fname0;
|
||||||
input;
|
input;
|
||||||
put _infile_;
|
put _infile_;
|
||||||
|
data _null_;
|
||||||
|
infile &fname1;
|
||||||
|
input;
|
||||||
|
put _infile_;
|
||||||
run;
|
run;
|
||||||
%end;
|
%end;
|
||||||
|
|
||||||
proc http method='POST' in=&fname0 out=&fname1
|
proc http method='POST' in=&fname0 headerin=&fname1 out=&fname2
|
||||||
url="&_sasjs_apiserverurl/SASjsApi/drive/file";
|
url="&_sasjs_apiserverurl/SASjsApi/drive/file";
|
||||||
headers "Content-Type"="multipart/form-data; boundary=&boundary";
|
|
||||||
%if &mdebug=1 %then %do;
|
%if &mdebug=1 %then %do;
|
||||||
debug level=1;
|
debug level=1;
|
||||||
%end;
|
%end;
|
||||||
@@ -73,7 +82,7 @@ run;
|
|||||||
|
|
||||||
%let statcd=0;
|
%let statcd=0;
|
||||||
data _null_;
|
data _null_;
|
||||||
infile &fname1;
|
infile &fname2;
|
||||||
input;
|
input;
|
||||||
putlog _infile_;
|
putlog _infile_;
|
||||||
if _infile_='{"status":"success"}' then call symputx('statcd',1,'l');
|
if _infile_='{"status":"success"}' then call symputx('statcd',1,'l');
|
||||||
|
|||||||
Reference in New Issue
Block a user