|
<SfFileManager ID="file">
<FileManagerEvents Created="@OnCreated"></FileManagerEvents>
<FileManagerAjaxSettings Url="/api/SampleData/FileOperations"
GetImageUrl="/api/SampleData/GetImage"
UploadUrl="/api/SampleData/Upload"
DownloadUrl="/api/SampleData/Download">
</FileManagerAjaxSettings>
</SfFileManager>
@code{
[Inject]
public IJSRuntime JSRuntime { get; set; }
public async void OnCreated()
{
await JSRuntime.InvokeAsync<string>("FileManager");
}
} |
|
<script>
function FileManager() {
var fileObj = document.getElementById("file").ej2_instances[0];
fileObj.uploadObj.dropArea = null;
}
</script> |
|
<style>
#file .e-empty-inner-content {
display: none;
}
</style> |
|
Getting started |
|
|
API reference |
|
|
Demo |
For me the property AllowDragAndDrop is not effective at all. So I tried to implement the above, and I am getting
"ej2_instances is undefined"
My package references look like:
<PackageReference Include="Syncfusion.Blazor.Navigations" Version="19.4.0.56" />
<PackageReference Include="Syncfusion.Blazor.RichTextEditor" Version="19.4.0.56" />
<PackageReference Include="Syncfusion.Blazor.FileManager" Version="19.4.0.56" />
Any advice? Did something change in my version (as you can see I'm using separate nugets)?