@@ -20,13 +20,15 @@ import { getValidRangeSize } from "./OneDriveLargeFileUploadTaskUtil";
2020 * @interface
2121 * Signature to define options when creating an upload task
2222 * @property {string } fileName - Specifies the name of a file to be uploaded (with extension)
23+ * @property {string } [fileDescription] - Specifies the description of the file to be uploaded
2324 * @property {string } [path] - The path to which the file needs to be uploaded
2425 * @property {number } [rangeSize] - Specifies the range chunk size
2526 * @property {string } [conflictBehavior] - Conflict behaviour option
2627 * @property {UploadEventHandlers } [uploadEventHandlers] - UploadEventHandlers attached to an upload task
2728 */
2829export interface OneDriveLargeFileUploadOptions {
2930 fileName : string ;
31+ fileDescription ?: string ;
3032 path ?: string ;
3133 rangeSize ?: number ;
3234 conflictBehavior ?: string ;
@@ -37,10 +39,12 @@ export interface OneDriveLargeFileUploadOptions {
3739 * @interface
3840 * Signature to define options when creating an upload task
3941 * @property {string } fileName - Specifies the name of a file to be uploaded (with extension)
42+ * @property {string } [fileDescription] - Specifies the description of the file to be uploaded
4043 * @property {string } [conflictBehavior] - Conflict behaviour option
4144 */
4245interface OneDriveFileUploadSessionPayLoad {
4346 fileName : string ;
47+ fileDescription ?: string ;
4448 conflictBehavior ?: string ;
4549}
4650
@@ -160,6 +164,7 @@ export class OneDriveLargeFileUploadTask<T> extends LargeFileUploadTask<T> {
160164 const requestUrl = OneDriveLargeFileUploadTask . constructCreateSessionUrl ( options . fileName , options . path ) ;
161165 const uploadSessionPayload : OneDriveFileUploadSessionPayLoad = {
162166 fileName : options . fileName ,
167+ fileDescription : options . fileDescription ,
163168 conflictBehavior : options . conflictBehavior ,
164169 } ;
165170 const session = await OneDriveLargeFileUploadTask . createUploadSession ( client , requestUrl , uploadSessionPayload ) ;
@@ -185,6 +190,7 @@ export class OneDriveLargeFileUploadTask<T> extends LargeFileUploadTask<T> {
185190 item : {
186191 "@microsoft.graph.conflictBehavior" : payloadOptions ?. conflictBehavior || "rename" ,
187192 name : payloadOptions ?. fileName ,
193+ description : payloadOptions ?. fileDescription ,
188194 } ,
189195 } ;
190196 return super . createUploadSession ( client , requestUrl , payload ) ;
0 commit comments