Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

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 DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...dnnFileUploadDropZonednnFileUploadDropZone
Previous
 
Next
New Post
8/6/2014 10:41 AM
 

Hello there, 

I really like the drag and drop file upload tool that is in admin> Site-Settings   in basic settings under  Appearance category. i.e. the one that you change the logo of the website with it. 

Since file uploading with Ajax has been little bit problematic and this control works very fine, I really would like to use it in my module. 

I wonder if there is a API for it or somebody can give me some hints how it works ?

 

I just find out this Jquery related to this but I would appreciate a little bit of clarification :) 

 

var initDnnFileUploader = function() {
var settings = {
fileFilter: 'jpg,jpeg,jpe,gif,bmp,png',
required: true,
foldersComboId: 'dnn_ctr386_SiteSettings_ctlBackground_FoldersComboBox',
filesComboId: 'dnn_ctr386_SiteSettings_ctlBackground_FilesComboBox',
fileUploadId: 'dnn_ctr386_SiteSettings_ctlBackground_FileUploadControl',
folder: '',
selectedFolderId: 41,
progressBarId: 'dnn_ctr386_SiteSettings_ctlBackground_dnnFileUploadProgressBar',
dropZoneId: 'dnn_ctr386_SiteSettings_ctlBackground_dnnFileUploadDropZone'
};
$('#dnn_ctr386_SiteSettings_ctlBackground_dnnFileUploadScope').dnnFileUpload(settings);
};
$(initDnnFileUploader);
// microsoft ajax registered - to fix microsoft ajax update panel post back
if(typeof Sys != 'undefined')
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(initDnnFileUploader); 

 

  Thanks in advance 

 
New Post
8/7/2014 10:36 AM
 

You should use the DNN FilePickerUploader control.  You can see an example of it in use in the sitesettings.ascx control:

< %@ Register TagPrefix="dnn" TagName="FilePickerUploader" Src="~/controls/filepickeruploader.ascx" % >
< dnn:FilePickerUploader ID="ctlID" runat="server" Required="True" / >

Then you can set the necessary properties for ctlID in your code behind.


Joe Brinkman
DNN Corp.
 
New Post
8/11/2014 8:59 AM
 
Thanks Joe for the answer ,

FilePickerUploader is a nice control but there is too little info about it online yet.

Since our module is a AJAX based, we need figure the name of uploaded/Saved file out and give it to our jQuery to take care of it. (Send it to the web service with other info to write into the database).

I wonder if there is a way to get the name (path) of saved file and pass it to jQuery plus fire a event (i.e onDownloadComplete)?
 
New Post
8/11/2014 9:10 AM
 

Hi 

Just to supply you with more info about the DnnFilepicker, here is a great resource which I use all the time:

http://dotnetnukeru.com/Dnn6Docs/api/html/T_DotNetNuke_Web_UI_WebControls_DnnFilePicker.htm

It has all the methods, properties, event etc of the control.

Hope this helps,

Geoff


      
 
New Post
8/20/2014 5:59 AM
 
Thanks Geoff
 
Previous
 
Next
HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...dnnFileUploadDropZonednnFileUploadDropZone


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out