@@ -55,7 +55,7 @@ public MergeSpreadsheetsRequest()
55
55
/// <param name="fontsLocation">Use Custom fonts.</param>
56
56
/// <param name="regoin">The spreadsheet region setting.</param>
57
57
/// <param name="password">The password for opening spreadsheet file.</param>
58
- public MergeSpreadsheetsRequest ( string spreadsheet , string outFormat = null , bool ? mergeInOneSheet = null , string outPath = null , string outStorageName = null , string fontsLocation = null , string regoin = null , string password = null )
58
+ public MergeSpreadsheetsRequest ( IDictionary < string , System . IO . Stream > spreadsheet , string outFormat = null , bool ? mergeInOneSheet = null , string outPath = null , string outStorageName = null , string fontsLocation = null , string regoin = null , string password = null )
59
59
{
60
60
this . Spreadsheet = spreadsheet ;
61
61
this . outFormat = outFormat ;
@@ -70,7 +70,7 @@ public MergeSpreadsheetsRequest(string spreadsheet, string outFormat = null, b
70
70
/// <summary>
71
71
/// Upload spreadsheet file.
72
72
/// </summary>
73
- public string Spreadsheet { get ; set ; }
73
+ public IDictionary < string , System . IO . Stream > Spreadsheet { get ; set ; }
74
74
75
75
76
76
/// <summary>
@@ -132,7 +132,7 @@ public HttpWebRequest CreateHttpRequest(string baseUri,IDictionary<string, strin
132
132
string localVarPostBody = "" ;
133
133
string localVarHttpContentType = "application/json" ;
134
134
// verify the required parameter 'spreadsheet' is set
135
- if ( string . IsNullOrEmpty ( this . Spreadsheet ) )
135
+ if ( this . Spreadsheet == null )
136
136
{
137
137
throw new ApiException ( 400 , "Missing required parameter 'spreadsheet' when calling MergeSpreadsheets" ) ;
138
138
}
@@ -158,12 +158,13 @@ public HttpWebRequest CreateHttpRequest(string baseUri,IDictionary<string, strin
158
158
}
159
159
}
160
160
161
- if ( ! string . IsNullOrEmpty ( Spreadsheet ) && System . IO . File . Exists ( Spreadsheet ) ) {
162
- System . IO . FileInfo fileInfo = new System . IO . FileInfo ( Spreadsheet ) ;
163
- localVarFileParams . Add ( fileInfo . Name , UrlHelper . ToFileInfo ( System . IO . File . OpenRead ( Spreadsheet ) , fileInfo . Name ) ) ;
164
- }
165
-
166
-
161
+
162
+ if ( Spreadsheet != null ) {
163
+ foreach ( KeyValuePair < string , System . IO . Stream > keyValueFileParam in Spreadsheet )
164
+ {
165
+ localVarFileParams . Add ( keyValueFileParam . Key , UrlHelper . ToFileInfo ( keyValueFileParam . Value , keyValueFileParam . Key ) ) ;
166
+ }
167
+ }
167
168
168
169
return UrlHelper . PrepareRequest ( path , "PUT" , localVarFileParams , localVarHeaderParams , localVarPostBody , localVarHttpContentType , defaultHeaderMap , requestHandlers ) ;
169
170
}
0 commit comments