@sasjs/core 4.18.1 → 4.18.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/server/ms_createfile.sas +13 -4
package/package.json
CHANGED
package/server/ms_createfile.sas
CHANGED
|
@@ -29,9 +29,10 @@
|
|
|
29
29
|
,mdebug=0
|
|
30
30
|
);
|
|
31
31
|
|
|
32
|
-
%local fname0 fname1 boundary fname statcd msg;
|
|
32
|
+
%local fname0 fname1 fname2 boundary fname statcd msg;
|
|
33
33
|
%let fname0=%mf_getuniquefileref();
|
|
34
34
|
%let fname1=%mf_getuniquefileref();
|
|
35
|
+
%let fname2=%mf_getuniquefileref();
|
|
35
36
|
%let boundary=%mf_getuniquename();
|
|
36
37
|
|
|
37
38
|
data _null_;
|
|
@@ -55,17 +56,25 @@ data _null_;
|
|
|
55
56
|
end;
|
|
56
57
|
run;
|
|
57
58
|
|
|
59
|
+
data _null_;
|
|
60
|
+
file &fname1;
|
|
61
|
+
put "Content-Type: multipart/form-data; boundary=&boundary";
|
|
62
|
+
run;
|
|
63
|
+
|
|
58
64
|
%if &mdebug=1 %then %do;
|
|
59
65
|
data _null_;
|
|
60
66
|
infile &fname0;
|
|
61
67
|
input;
|
|
62
68
|
put _infile_;
|
|
69
|
+
data _null_;
|
|
70
|
+
infile &fname1;
|
|
71
|
+
input;
|
|
72
|
+
put _infile_;
|
|
63
73
|
run;
|
|
64
74
|
%end;
|
|
65
75
|
|
|
66
|
-
proc http method='POST' in=&fname0 out=&
|
|
76
|
+
proc http method='POST' in=&fname0 headerin=&fname1 out=&fname2
|
|
67
77
|
url="&_sasjs_apiserverurl/SASjsApi/drive/file";
|
|
68
|
-
headers "Content-Type"="multipart/form-data; boundary=&boundary";
|
|
69
78
|
%if &mdebug=1 %then %do;
|
|
70
79
|
debug level=1;
|
|
71
80
|
%end;
|
|
@@ -73,7 +82,7 @@ run;
|
|
|
73
82
|
|
|
74
83
|
%let statcd=0;
|
|
75
84
|
data _null_;
|
|
76
|
-
infile &
|
|
85
|
+
infile &fname2;
|
|
77
86
|
input;
|
|
78
87
|
putlog _infile_;
|
|
79
88
|
if _infile_='{"status":"success"}' then call symputx('statcd',1,'l');
|