1

I am in the process of developing the registration module which has profile image upload functionality , I am using HTML file upload control with Web API to access database., can any one please share how to do file upload in Code behind so that the file name should be store in Files table as well as to get four re-sized image in /portals/0/user path.

Diptendu
  • 2,120
  • 1
  • 15
  • 28
Gowtham k
  • 45
  • 1
  • 10

2 Answers2

0

Please try to have a look at the below link -
http://www.codeproject.com/Articles/1757/File-Upload-with-ASP-NET

It just shows upload image using Asp.net code

Gopi.cs
  • 985
  • 1
  • 16
  • 41
0

You could use the DNNFilePicker in your module view

Limit the folder by using the ShowFolders attribute on the tag:

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

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

In Page_Load event, set the folder:

// Limit filepath to user's folder
fpUserFiles.FilePath = FolderManager.Instance.GetUserFolder(User).FolderPath;
Fix It Scotty
  • 2,852
  • 11
  • 12
  • Thanks for a reply, I am not suppose to use DnnFilePicker, I must use only HTML controls in my registration form. Is there is any way to do it? – Gowtham k Jun 26 '15 at 04:10