DNN 9 SPA Module File Upload

437 Views Asked by At

I really hate asking questions like this... but could someone point me to some examples of how to upload a file in a custom DNN 9 SPA module? I have been looking and have not been able to find anything.

Thank you in advance

2

There are 2 best solutions below

2
On

You can use the build-in DnnFilePicker

<%@ Register TagPrefix="dnn" Assembly="DotNetNuke.Web" Namespace="DotNetNuke.Web.UI.WebControls" %>

<dnn:DnnFilePicker runat="server" ShowFolders="false" ID="fpUserFiles" FileFilter="pdf,gif,jpg" />
0
On

You can really use any client-side file upload (e.g., DropZone, jQuery Upload, standard HTML 5 upload, etc.) and then use a DNN Web API endpoint to perform the server-side saving of the file.