Skip to content

walcivar/PowerPagesFileUploader

Repository files navigation

The goal of this PCF is to allow an external user through Power Pages to upload documents by drag and drop with the option to preview the document before uploading it so that the user can be sure of the document being uploaded.

This PCF also works for Model Driven Apps so internal users can do the same.

The document repository for this PCF is Azure blob storage so first you will have to configure this service if you want to use this PCF.

  1. Configure Azure blob storage:

Create a storage account: Create a Container Configure CORS Settings under the Storage account

image

Create a Shared access signature

image

Click in Generate SAS and connection string and copy the SAS token

image

  1. Create a text environment variable in your solution, then copy and paste the created SAS token
  2. Import the managed or unmanaged solution in your environment
  3. Create a text column

For Model Driven App

  1. Add the PCF to the new column and configure it as the following image, for Height set it as 400 for width set it as 100%, the rest parameters you will have to set your own values:

image

That’s it now you can use the PCF in a Model Driven App.

If you want to use it also in Power Pages, do these additional steps: 6) Beside configuring the PCF in the form you will have to add a code component metadata to the form:

image

  1. Don’t forget to turn on the Webapi for the following tables:

image

  1. Create the table permission records for Contact, Environment Variable Definition and Environment Variable Value tables:

image

  1. Clear the site cache and you are free to go

image

FileUploaderPCF

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published