Articles in this section
Category / Section

How to increase upload file size in FileManager

1 min read

Increase the upload file size in FileManager component

 

Problem dDescription:

 

In the FileManager component, you can upload the files with default file size 30mb (default size). For example, minimum file size is 0 and maximum file size can be up to 30000000 bytes for uploading a file in the File Manager component. In FileManager, if weyou upload a file with size that exceeds 30000000 bytes, then it will not get uploaded to the target directory and, it will throw an exception message.

 

Solution dDescription:

 

You can change the upload file size by using the uploadSettings property of file manager component. Using this property, you can set the maxFileSize and minFileSize. Size should be set in bytes.

 

Code snippet:

 

<ejs-filemanager id='overview' [ajaxSettings]='ajaxSettings' [view]='view' [uploadSettings]="uploadSettings">
</ejs-filemanager>
 
App.component.ts
 
public ngOnInit(): void {
        //Max file size is 500Mb
        this.uploadSettings ={minFileSize: 0, maxFileSize: 5e+8 }
}

 

 

Sample Link:

 

By default, we have prevented the upload settings in online service. So, you have to use the local service to check the upload functionality in File Manager.

 

Local Service link: https://github.com/SyncfusionExamples/ej2-aspcore-file-provider

 

Sample link: https://stackblitz.com/edit/angular-erezuh-ciftyp?file=app.component.ts

 

Step to run the service:

 

  1. Clone or download the service URL in Visual Studio.

  1. Run the service and copy the service URL link.

 

  1. Paste the service URL link in FileManager sample.

 

public hostUrl: string = 'HostURL';

 

public ngOnInit(): void {

        this.ajaxSettings = {

        url: this.hostUrl + 'api/FileManager/FileOperations',

        getImageUrl: this.hostUrl + 'api/FileManager/GetImage',

        uploadUrl: this.hostUrl + 'api/FileManager/Upload',

        downloadUrl: this.hostUrl + 'api/FileManager/Download'

        };

}

Conclusion

I hope you enjoyed learning how to increase upload file size in FileManager.
You can refer to our Angular FileManager feature tour page to learn about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications. You can also explore our Angular FileManager example to understand how to create and manipulate data.
For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.
If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forumsDirect-Trac, or feedback portal. We are always happy to assist you!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied