New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the Community Exchange, where community members ask and answer questions about DNN. To get started, just start typing your question below and either select one of the suggested questions or ask a new question of your own.

Building a custom User File Upload Module (DNNFilePicker, URL Control, Documents)

Return to previous page

  • 9/22/2017
  • 2872 Views

Question:

Zayne Repsold 7 years ago

Hi There,

I have to looked at the URL Control, Documents Module and some other suggestions.

I need to create a custom module which allows a Registered user to upload any file to the DNN site.

Once they have submitted the uploaded item, I would like to send a link to an Email Address so that our Tasking System for our graphic design department can click on the link to download the uploaded file(s).

I am thinking of using the DNNFilePicker and in the codebehind I would like the FilePicker folder path to be the Users default DNN folderpath.

This is my codebehind so far:

protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                var userfolder = FolderManager.Instance.GetUserFolder(UserInfo).FolderPath;
                var doesfolderexist = FolderManager.Instance.FolderExists(PortalId, userfolder);
                if(doesfolderexist == true)
                {
                    txtFileUpload.FilePath = FolderManager.Instance.GetFolder(PortalId, userfolder).FolderPath;
                }
            }

So my question is, is there any easier way to set the User Folder and check if it exist and am I on the right path or should I create my own FilePicker?

Building a custom User File Upload Module (DNNFilePicker, URL Control, Documents)

Zayne Repsold
Zayne Repsold 7 years ago
Add an Answer

Answers

Sign In to Participate
Or register to become a member