private onUploadButtonClick(event: Event): void
{
var fileOptions = {} as ComponentFramework.DeviceApi.PickFileOptions;
fileOptions.allowMultipleFiles = true;
fileOptions.maximumAllowedFileSize = 104857600;
this._context.device.pickFile(fileOptions).then(this.processFile.bind(this), this.showError.bind(this));
}
private processFile(files: ComponentFramework.FileObject[]): void
{
if(files.length > 0)
{
let fileList = "";
try{
files.forEach(element => {
fileList += element.fileName;
fileList += "#";
fileList += element.fileContent;
fileList += ";";
});
this._value = fileList;
this._notifyOutputChanged();
}
catch(err)
{
this.showError();
}
}
}
public getOutputs(): IOutputs
{
// return outputs
let result: IOutputs =
{
value: this._value!
};
return result;
}
<property name="value" display-name-key="value_Display_Key" description-key="value_Desc_Key" of-type="Multiple" usage="bound" required="true" />
In the processFile callback, I'm looping through the list of files selected, concatenating the base64 file content and returning that as output. Though I've set the max. allowed size is 100MB, I get an error when I try to upload a 80MB file. The max. size I could upload was about 70MB
if we could get the pcf that would be great, i'm currently running into file size limits uploading to azure blob and i think i've exhausted all options
Hi, @Rajesh i have a similar requirement please let me know if it is possible to share the final code or if possible please share the PCF component zip file through Github,
thank you.
Hi,
is there any solution for large file upload? I also need to upload large files with powerapps control in sharepoint list or library, the limit is still10MB, can this be increased?
Thank you
Hi @Rajesh ,
Have you solved your problem?
If you have solved your problem, please consider go ahead to click "Accept as Solution" to identify this thread has been solved
If you do not mind, you could consider share your solution here, so any other users faced same issue could refer to your solution.
Best regards,
@v-xida-msft I've managed to solve this by calling the Azure javascript library for file upload from within the component. With this approach I'm able to upload very large files and multiple file uploads. I've tried uploading 500 MB file and seemed to work fine. Component now sends only the list of files uploaded back to the host, so I never run into the issue of string limitation.
Hi @Rajesh ,
Based on the Client API that you mentioned, I think you are in right direction. The context.device.pickFile(options) Client API could opens a dialog box to select files from your computer (web client) or mobile device (mobile client), but this API is only available in Model-Driven app rather than canvas app.
According to the issue that you mentioned, I think this issue is related to the data type of the "value" property you set in your PCF project. When you assign value to the "value" (Multiple type) property, it could not be more than the known limit -- 1,048,576 text characters.
Based on the needs that you mentioned, I afraid that the "Multiple" data type could not achieve your needs, and there is no way to achieve your needs using PCF due to this known limit.
If you would like this feature to be improved in PowerApps, please consider submit an idea to PowerApps Ideas Forum:
https://powerusers.microsoft.com/t5/Power-Apps-Ideas/idb-p/PowerAppsIdeas
If you would like to get further help in this issue, please consider submit an assisted support ticket through the following link:
https://powerapps.microsoft.com/en-us/support/pro
Best regards,
WarrenBelz
109
Most Valuable Professional
Michael E. Gernaey
76
Super User 2025 Season 1
mmbr1606
71
Super User 2025 Season 1