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...Using Flajaxian FileUploader in moduleUsing Flajaxian FileUploader in module
Previous
 
Next
New Post
5/12/2009 6:49 PM
 

Folks,

I've got a hard question I've been wrestling with for a few days.  I'm trying to get direct to Amazon S3 uploads running in a module.  I've been able to get a proxy upload to work where I upload it to the web server, then on to S3, but that's inefficient and the user experience sucks with large files that take 20 minutes to complete.

Fortunately, Flajaxian has a handy solution here: http://www.flajaxian.com/  But at this point I'm trying to crawl before I run.  The direct to S3 adapter works with the flajaxian file uploader you can find here: http://flajaxianfileupload.codeplex.com/

I built a one-page site on localhost and installed the control.  With some fiddling, I got it to work as advertized.  But then I tried it in DNN, and have been stuck ever since.  The support at flajaxian is quick and responsive, but they don't know anything about DNN.  There's something about DNN that is making this not work.

I made a module with just this control in it.  I've installed the control here: http://simsbeta.com/Talks/TestUpload/tabid/127/Default.aspx.  In the non-DNN site, I get the FileReceived event you see below.  No joy in DNN.  My source is as follows:

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="testupload.ascx.cs" Inherits="DotNetNuke.Modules.DharmaTalks.testupload" %>
<%@ Register TagPrefix="fjx" Namespace="com.flajaxian" Assembly="com.flajaxian.FileUploader" %>

Choose MP3 file to upload:
<br />
<fjx:FileUploader ID="FileUploader1" runat="server" OnFileReceived="FileUploader1_FileReceived">
    <Adapters>
        <fjx:FileSaverAdapter Runat="server" FolderName="UploadFolder" />
    </Adapters>
</fjx:FileUploader>  

With code behind:

using System;

namespace DotNetNuke.Modules.DharmaTalks
{
    public partial class testupload : DotNetNuke.Entities.Modules.PortalModuleBase
    {

        protected void FileUploader1_FileReceived(object sender, com.flajaxian.FileReceivedEventArgs e)
        {
            throw new NotImplementedException();
        }
    }
}

The control adds a bunch of JS to the page, and I'm guessing the problem might be in there.

<div id="dnn_ctr741_ModuleContent" class="SIMS TalksContent">

Choose MP3 file to upload:
<br />
<div id="dnn_ctr741_testupload_FileUploader1">
		<a href="http://get.adobe.com/flashplayer/" target="_blank">Please install Adobe Flash Player</a>
	</div>
	<script type="text/javascript" language="javascript">
		window.dnn_ctr741_testupload_FileUploader1 = new Flajaxian.FileUploader2('dnn_ctr741_testupload_FileUploader1');
		function dnn_ctr741_testupload_FileUploader1_MarkInitialized(){ window.dnn_ctr741_testupload_FileUploader1.markInitialized(); }
		function dnn_ctr741_testupload_FileUploader1_SetFileList(list){ window.dnn_ctr741_testupload_FileUploader1.setFileList(list); }
		function dnn_ctr741_testupload_FileUploader1_SetUploadProgress(evt){ window.dnn_ctr741_testupload_FileUploader1.setUploadProgress(evt); }
		function dnn_ctr741_testupload_FileUploader1_SetChangedFileStates(list){ window.dnn_ctr741_testupload_FileUploader1.setChangedFileStates(list); }
		function dnn_ctr741_testupload_FileUploader1_LimitReached(type){ window.dnn_ctr741_testupload_FileUploader1.limitReached(type); }
		function dnn_ctr741_testupload_FileUploader1_ConfirmUpload(){ window.dnn_ctr741_testupload_FileUploader1.confirmUpload(); }
		function dnn_ctr741_testupload_FileUploader1_Dispose(){ window.dnn_ctr741_testupload_FileUploader1.dispose(); }
		function dnn_ctr741_testupload_FileUploader1_EmbedFlash(){
			var p = {menu:false,base:'.',scale:'noscale',bgcolor:'#FFFFFF'};
			var a = {};
			var fv = {id:"dnn_ctr741_testupload_FileUploader1",targetUrl:"http://simsbeta.com/Default.aspx?__ID=dnn_ctr741_testupload_FileUploader1_(!AMP!)_",debug:false,enabled:true,isIE:Flajaxian.isIE(),clearListAtEnd:true,uploadRequiresJsConfirmation:false,initiallyInvisible:false,maxFileSize:1072668082176,maxFileQueueSize:1072668082176,maxFileNumberLimit:2147483647};
			swfobject.embedSWF("/WebResource.axd?d=IsqpByigtk34zp3y-m4U50vFCQAV_cx1ES9QquVFKKGoEMUJmmRBiLmGHCpb9GqAMQZ585qMlb7mN9V4Eil0mQgsMWYBUcWt0&t=633777437526668880", "dnn_ctr741_testupload_FileUploader1", "251", "40", "9.0.0", "/WebResource.axd?d=IsqpByigtk34zp3y-m4U50vFCQAV_cx1ES9QquVFKKGoEMUJmmRBiLmGHCpb9GqAO0Lz1e7fdYzKosKVPcxNSaK94sDNpLai0&t=633777437526668880", fv, p, a);
			var fu = window.dnn_ctr741_testupload_FileUploader1;
			fu.set_generateBaseHtmlFunc(Flajaxian.generateBaseHtml);
			fu.set_generateFileRowFunc(Flajaxian.generateFileRow);
			fu.set_disposeFileRowFunc(Flajaxian.disposeFileRow);
			fu.set_fileStateChangedFunc(Flajaxian.fileStateChanged);
			fu.set_percentageChangedFunc(Flajaxian.percentageChangedFunc);
			fu.set_maxFileNumberReachedFunc(Flajaxian.maxFileNumberReached);
			fu.set_maxFileSizeReachedFunc(Flajaxian.maxFileSizeReached);
			fu.set_maxQueueSizeReachedFunc(Flajaxian.maxQueueSizeReached);
			fu.set_positionFilesListFunc(Flajaxian.positionFilesList);
			fu.set_renderFilesListFunc(Flajaxian.renderFilesList);
			fu.set_strings({maxFileNumberReached:'The maximum number of files allowed to be selected of \'2147483647\' has been reached.',maxFileSizeReached:'The maximum allowed file size of \'999GB\' has been exceeded.',maxQueueSizeReached:'The maximum allowed size of \'999GB\' for all the files in the queue has been exceeded.'});
			fu.set_openedArrowUrl("/WebResource.axd?d=IsqpByigtk34zp3y-m4U50vFCQAV_cx1ES9QquVFKKGoEMUJmmRBiLd1vbotsffcvXhPWpS2EsbMH49Bgj9L1qkqSkuURbJb0&t=633777437526668880");
			fu.set_closedArrowUrl("/WebResource.axd?d=IsqpByigtk34zp3y-m4U50vFCQAV_cx1ES9QquVFKKGoEMUJmmRBiLd1vbotsffcy0zWaVW3ZxtZyxxhNe78XlSrIOZf4GyZ0&t=633777437526668880");
			fu.set_closeBtnUrl("/WebResource.axd?d=IsqpByigtk34zp3y-m4U50vFCQAV_cx1ES9QquVFKKGoEMUJmmRBiLd1vbotsffcWd-Q7rskykkjxoMbwOwY6csI8O_iol0y0&t=633777437526668880");
			fu.set_flashWidth(251);
			fu.set_flashHeight(40);
			fu.set_uploadRequiresJsConfirmation(false);
			fu.set_clearListAtEnd(true);
			fu.initialize();
		}
		dnn_ctr741_testupload_FileUploader1_EmbedFlash();

</script>   
</div><!-- End_Module_741 -->

I know it's a long shot, but does anyone see anything weird in here this control is trying to do that DNN won't like?

As always, thanks for your help.
 
New Post
5/12/2009 10:13 PM
 

Sorry I know nothing about your uploader but I see the "swfobject.embedSWF" so I assume it's Flash and it's passing the file to a custom file handler "/WebResource.axd. Perhaps you can alter the file uploader I got working with DNN: http://dnnsilverlight.adefwebserver.com/Silverlight20/SilverlightFileUploader/tabid/73/Default.aspx ?



Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
Previous
 
Next
HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...Using Flajaxian FileUploader in moduleUsing Flajaxian FileUploader in module


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