@@ -382,10 +382,11 @@ public async Task<FileChunkDetailViewModel> GetFileChunkDetail(int fileChunkDeta
382382 /// </summary>
383383 /// <param name="resourceVersionId">The resourceVersionId<see cref="int"/>.</param>
384384 /// <param name="file">The file<see cref="IFormFile"/>.</param>
385+ /// <param name="fileSize">The fileSize<see cref="int"/>.</param>
385386 /// <param name="existingFileId">The existingFileId<see cref="int"/>.</param>
386387 /// <param name="currentUserId">The currentUserId<see cref="int"/>.</param>
387388 /// <returns>The <see cref="Task{FileUploadResult}"/>.</returns>
388- public async Task < FileUploadResult > ProcessArticleFileAsync ( int resourceVersionId , IFormFile file , int existingFileId , int currentUserId )
389+ public async Task < FileUploadResult > ProcessArticleFileAsync ( int resourceVersionId , IFormFile file , int fileSize , int existingFileId , int currentUserId )
389390 {
390391 var filelocation = string . Empty ;
391392 string extension = Path . GetExtension ( file . FileName ) . Replace ( "." , string . Empty ) ;
@@ -415,7 +416,7 @@ public async Task<FileUploadResult> ProcessArticleFileAsync(int resourceVersionI
415416 FileTypeId = fileType == null ? 0 : fileType . Id ,
416417 FileName = file . FileName ,
417418 FilePath = filelocation ,
418- FileSize = ( int ) ( file . Length / 1000 ) ,
419+ FileSize = ( int ) ( fileSize / 1000 ) ,
419420 ReplacedFileId = existingFileId ,
420421 } ) ;
421422
@@ -425,7 +426,7 @@ public async Task<FileUploadResult> ProcessArticleFileAsync(int resourceVersionI
425426 ResourceVersionId = resourceVersionId ,
426427 FileName = file . FileName ,
427428 FileTypeId = fileType == null ? 0 : fileType . Id ,
428- FileSizeKb = ( int ) ( file . Length / 1000 ) ,
429+ FileSizeKb = ( int ) ( fileSize / 1000 ) ,
429430 Invalid = false ,
430431 } ;
431432 }
0 commit comments