diff --git a/src/Blazor.FileReader/FileReaderRef.cs b/src/Blazor.FileReader/FileReaderRef.cs index 0690714..ef2727d 100644 --- a/src/Blazor.FileReader/FileReaderRef.cs +++ b/src/Blazor.FileReader/FileReaderRef.cs @@ -115,6 +115,11 @@ public interface IFileInfo /// string Name { get; } + /// + /// Returns a list of non-standard DOM properties attached to the object, like the webkitRelativePath property. + /// + Dictionary NonStandardProperties { get; } + /// /// Returns the size of the file in bytes. /// @@ -238,6 +243,8 @@ public FileInfo() public string Name { get; set; } + public Dictionary NonStandardProperties { get; set; } + public long Size { get; set; } public string Type { get; set; } diff --git a/src/Blazor.FileReader/script/FileReaderComponent.ts b/src/Blazor.FileReader/script/FileReaderComponent.ts index 35ddc6d..c65a29e 100644 --- a/src/Blazor.FileReader/script/FileReaderComponent.ts +++ b/src/Blazor.FileReader/script/FileReaderComponent.ts @@ -30,6 +30,7 @@ interface IReadFileParams { interface IFileInfo { name: string; + nonStandardProperties: any; size: number; type: string; lastModified: number; @@ -143,13 +144,20 @@ class FileReaderComponent { } public GetFileInfoFromFile(file: File): IFileInfo { - const result = { + var result = { lastModified: file.lastModified, name: file.name, + nonStandardProperties: null, size: file.size, type: file.type }; - + var properties: any = new Object(); + for (let property in file) { + if (Object.getPrototypeOf(file).hasOwnProperty(property) && !(property in result)) { + properties[property] = file[property]; + } + } + result.nonStandardProperties = properties; return result; } diff --git a/src/Blazor.FileReader/wwwroot/FileReaderComponent.js b/src/Blazor.FileReader/wwwroot/FileReaderComponent.js index a1f2925..41f24c7 100755 --- a/src/Blazor.FileReader/wwwroot/FileReaderComponent.js +++ b/src/Blazor.FileReader/wwwroot/FileReaderComponent.js @@ -169,9 +169,17 @@ var FileReaderComponent = (function () { var result = { lastModified: file.lastModified, name: file.name, + nonStandardProperties: null, size: file.size, type: file.type }; + var properties = new Object(); + for (var property in file) { + if (Object.getPrototypeOf(file).hasOwnProperty(property) && !(property in result)) { + properties[property] = file[property]; + } + } + result.nonStandardProperties = properties; return result; }; FileReaderComponent.ConcatFileList = (function () { diff --git a/src/Blazor.FileReader/wwwroot/FileReaderComponent.js.map b/src/Blazor.FileReader/wwwroot/FileReaderComponent.js.map index 280b267..24f90db 100755 --- a/src/Blazor.FileReader/wwwroot/FileReaderComponent.js.map +++ b/src/Blazor.FileReader/wwwroot/FileReaderComponent.js.map @@ -1 +1 @@ -{"version":3,"file":"FileReaderComponent.js","sourceRoot":"","sources":["../script/FileReaderComponent.ts"],"names":[],"mappings":"AA4BC,CAAC;AAOD,CAAC;AAMF;IAAA;QAAA,iBAuOC;QArOW,2BAAsB,GAAG,CAAC,CAAC;QAClB,gBAAW,GAAsE,EAAE,CAAC;QACpF,iBAAY,GAAyD,IAAI,GAAG,EAAE,CAAC;QAC/E,yBAAoB,GAA+B,IAAI,GAAG,EAAE,CAAC;QAQvE,uBAAkB,GAAG,UAAC,OAAoB,EAAE,QAAiB;YAChE,KAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;YAExB,IAAM,OAAO,GAAG,UAAC,EAAa;gBAC1B,KAAI,CAAC,qBAAqB,CAAC,EAAE,CAAC,CAAC;gBAC/B,IAAI,EAAE,CAAC,MAAM,YAAY,WAAW,EAAE;oBAClC,IAAI,IAAI,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC;oBAEjC,IAAI,QAAQ,EAAE;wBACV,IAAM,QAAQ,GAAG,KAAI,CAAC,oBAAoB,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;wBACxD,IAAI,QAAQ,KAAK,SAAS,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;4BAC/C,IAAI,GAAG,IAAI,mBAAmB,CAAC,cAAc,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;yBACjE;qBACJ;oBAED,KAAI,CAAC,oBAAoB,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;iBAChD;YACL,CAAC,CAAC;YAEF,KAAI,CAAC,YAAY,CAAC,GAAG,CAAC,OAAO,EA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GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;oBACtC,IAAI,QAAQ,CAAC,CAAC,CAAC,KAAK,QAAQ,EAAE;wBAC1B,MAAM,GAAG,IAAI,CAAC;wBACd,MAAM;qBACT;iBACJ;gBAED,IAAI,CAAC,MAAM,EAAE;oBACT,iBAAiB,CAAC,iBAAiB,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAC;iBAC1D;aACJ;YAED,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,iBAAiB,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBAC/C,IAAI,CAAC,CAAC,GAAG,QAAQ,CAAC,MAAM,CAAC,GAAG,iBAAiB,CAAC,CAAC,CAAC,CAAC;aACpD;YAED,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM,GAAG,iBAAiB,CAAC,MAAM,CAAC;QAC7D,CAAC;QAhCD,sBAAI,GAAJ,UAAK,KAAa;YACd,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC;QA+BL,cAAC;IAAD,CAAC,AAtCuB,IAsCvB;IACL,0BAAC;CAAA,AA9OD,IA8OC;AAEA,MAAc,CAAC,mBAAmB,GAAG,IAAI,mBAAmB,EAAE,CAAC"} \ No newline at end of file diff --git a/src/Demo/Blazor.FileReader.Demo.Common/IndexCommon.razor b/src/Demo/Blazor.FileReader.Demo.Common/IndexCommon.razor index 2221f71..1a7c9f8 100644 --- a/src/Demo/Blazor.FileReader.Demo.Common/IndexCommon.razor +++ b/src/Demo/Blazor.FileReader.Demo.Common/IndexCommon.razor @@ -57,6 +57,10 @@ There are other demos in the menu. Output += $"{nameof(IFileInfo)}.{nameof(fileInfo.Size)}: {fileInfo.Size}{nl}"; Output += $"{nameof(IFileInfo)}.{nameof(fileInfo.Type)}: {fileInfo.Type}{nl}"; Output += $"{nameof(IFileInfo)}.{nameof(fileInfo.LastModifiedDate)}: {fileInfo.LastModifiedDate?.ToString() ?? "(N/A)"}{nl}"; + foreach(string property in fileInfo.NonStandardProperties.Keys) + { + Output += $"{nameof(IFileInfo)}.{property} (nonstandard): {fileInfo.NonStandardProperties[property]}{nl}"; + } Output += $"Reading file..."; this.StateHasChanged(); Console.WriteLine(Output);