@@ -55,7 +55,7 @@ public MergeSpreadsheetsRequest()
5555 /// <param name="fontsLocation">Use Custom fonts.</param>
5656 /// <param name="regoin">The spreadsheet region setting.</param>
5757 /// <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 )
5959 {
6060 this . Spreadsheet = spreadsheet ;
6161 this . outFormat = outFormat ;
@@ -70,7 +70,7 @@ public MergeSpreadsheetsRequest(string spreadsheet, string outFormat = null, b
7070 /// <summary>
7171 /// Upload spreadsheet file.
7272 /// </summary>
73- public string Spreadsheet { get ; set ; }
73+ public IDictionary < string , System . IO . Stream > Spreadsheet { get ; set ; }
7474
7575
7676 /// <summary>
@@ -132,7 +132,7 @@ public HttpWebRequest CreateHttpRequest(string baseUri,IDictionary<string, strin
132132 string localVarPostBody = "" ;
133133 string localVarHttpContentType = "application/json" ;
134134 // verify the required parameter 'spreadsheet' is set
135- if ( string . IsNullOrEmpty ( this . Spreadsheet ) )
135+ if ( this . Spreadsheet == null )
136136 {
137137 throw new ApiException ( 400 , "Missing required parameter 'spreadsheet' when calling MergeSpreadsheets" ) ;
138138 }
@@ -158,12 +158,13 @@ public HttpWebRequest CreateHttpRequest(string baseUri,IDictionary<string, strin
158158 }
159159 }
160160
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+ }
167168
168169 return UrlHelper . PrepareRequest ( path , "PUT" , localVarFileParams , localVarHeaderParams , localVarPostBody , localVarHttpContentType , defaultHeaderMap , requestHandlers ) ;
169170 }
0 commit comments