Quantcast
Channel: Ajax Uploader
Viewing all 132 articles
Browse latest View live

Get uploaded real file name!!!

$
0
0

Hi guys, I have the following problem.

WHen I try to upload files in different times, could happens that the name of a file is the same of a file aready present on the target destination. In that case, the uploader class provides to rename the new file, but I can't get the new filename...

The code I'm using is the following: 

 

          <%

                Dim uploader

                Set uploader=new AspUploader

                uploader.Name="myuploader"

                

                uploader.MaxSizeKB=10240

                uploader.InsertText="Upload File (Max 10M)"

               uploader.AllowedFileExtensions="*.pdf,*.jpg"

                uploader.MultipleFilesUpload=true

                

                uploader.SaveDirectory="documents"

                

                uploader.render()

            %>

 

 

 

<script type='text/javascript'>

      function CuteWebUI_AjaxUploader_OnTaskComplete(task)

      {

            savefiletodbrequest(task.FileName);

      }

 </script>

 


AjaxUploader Server Side Exception

$
0
0

Web.Config

<add key="CuteWebUI.AjaxUploader.GlobalMaxSizeKB" value="5120" />

 

 Asp

 <CuteWebUI:Uploader runat="server" ID="CuteUpload" InsertText="Upload" OnFileUploaded="CuteUpload_OnFileUploaded" FileTypeNotSupportMsg="This file type is not allowed. Allowed file types are pdf, jpeg, jpg, doc, docx, png, tiff, bmp." MultipleFilesUpload="False">

      <ValidateOption AllowedFileExtensions="pdf,jpg,gip,jpeg,doc,docx,png,tiff,bmp"></ValidateOption>

</CuteWebUI:Uploader> 

 

It is a newly implemented site which encountered the following EXCEPTIONs  yesterday.

Exception 1 :

Message: The file is corrupt or has an incorrect extension! 

Stack Trace: at CuteWebUI.UploaderValidateOption.ValidateFileData(UploaderProvider provider, Guid fileguid) at CuteWebUI.UploaderBase.a(Int32 A_0, String A_1, String A_2, String A_3, Stream A_4) at CuteWebUI.UploaderBase.a() at CuteWebUI.UploaderBase.b(String A_0) at CuteWebUI.UploaderBase.a(Object A_0, EventArgs A_1) at System.Web.UI.Control.OnPreRender(EventArgs e) at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Type: System.Exception 

 

Exception 2:

 Message: Error:TOOLARGE:5836369

 Stack Trace: at CuteWebUI.UploaderBase.a(Int32 A_0, String A_1, String A_2) at CuteWebUI.UploaderBase.a(Int32 A_0, String A_1, String A_2, String A_3, Stream A_4) at CuteWebUI.UploaderBase.a() at CuteWebUI.UploaderBase.b(String A_0) at CuteWebUI.UploaderBase.a(Object A_0, EventArgs A_1) at System.Web.UI.Control.OnPreRender(EventArgs e) at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

 Type: System.Exception 

 

I have not been able to replicate the issue and am hoping you can shed some light on it. Apologies for the lack of information.

 

UploadModule is not installed in web.config

$
0
0

I am struggling with an issue on my production server with the Uploader. I am getting the error saying "UploadModule is not installed in web.config.!"

I checked out a few similar messages in the board but couldn't find the problem.

 

In System.web I have

 

  <httpModules>

      <add name="CuteEditor.UploadModule" type="CuteEditor.UploadModule,CuteEditor" />

      <add type="DevExpress.Web.ASPxClasses.ASPxHttpHandlerModule, DevExpress.Web.v10.2, Version=10.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" name="ASPxHttpHandlerModule" />

      <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

      <add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" />

    </httpModules> 

 

In  <system.webServer> 

 

  <modules>

        <add type="DevExpress.Web.ASPxClasses.ASPxHttpHandlerModule, DevExpress.Web.v10.2, Version=10.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" name="ASPxHttpHandlerModule" />

      <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

      <add name="CuteWebUI.UploadModule" type="CuteWebUI.UploadModule,CuteWebUI.AjaxUploader"/>

    </modules>

    <handlers>

      <remove name="WebServiceHandlerFactory-Integrated" />

      <remove name="ScriptHandlerFactory" />

      <remove name="ScriptHandlerFactoryAppServices" />

      <remove name="ScriptResource" />

      <add type="DevExpress.Web.ASPxUploadControl.ASPxUploadProgressHttpHandler, DevExpress.Web.v10.2, Version=10.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" verb="GET,POST" path="ASPxUploadProgressHandlerPage.ashx" name="ASPxUploadProgressHandler" preCondition="integratedMode" />

      <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

      <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

      <add name="ScriptResource" verb="GET,HEAD" path="ScriptResource.axd" preCondition="integratedMode" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

    </handlers>

  </system.webServer> 

 

Looking at my error log I can see this error message  The file '/CuteWebUI.AjaxUploader.ashx' does not exist.

 

I tried http://www.mywebsite.com/CuteWebUI_Uploader_Resource.axd?type=file&file=uploading.gif it gives a "Resource not found message"

What I am missing ?

 

Ajax uploader version 3.0 doesnt work for SOME Safari Mac users

$
0
0

 

We upgraded recently to version 3.0 to reosolve IE 11 issues . Now the upload doesnt work on Safari Mac for SOME of our users.

I m not sure if this is a setting on their browser or something else.

I will update this post when I find out more.

 

 

 

Uploadattachement

$
0
0
Is it possible to hide the checkbox in uploadattachment? 

'System.Web.Extensions' is invalid

$
0
0

Our primary server recently when down and we switched to the back up.  Now we are getting an error in the web.config file and cannot begin to figure out what could be different that is causing the new error.  Can you please give me some guidance on where to start looking?  (Note: I'm not a .net nor server admin so be gentle with me.)

Thanks!

Cindy 

 

web.config:

<?xml version="1.0"?>
<configuration>
  <appSettings>

   <add key="AjaxUploaderLicense" value="~/ajaxuploader.lic" />

  </appSettings>
  <system.web>
        <customErrors mode="Off"/>
    </system.web>

  <system.web>
    <httpRuntime maxRequestLength="2000000"/>
  
    <pages>
      <controls>
        <add namespace="CuteWebUI" assembly="CuteWebUI.AjaxUploader" tagPrefix="CuteWebUI"/>
        <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
      </controls>
      <namespaces>
        <add namespace="System.Collections.Generic"/>
        <add namespace="System.IO"/>
        <add namespace="System.Data"/>
        <add namespace="System.Data.SqlClient"/>
      </namespaces>
    </pages>
    <compilation debug="true">
      <assemblies>
        <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
        <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
      </assemblies>
    </compilation>
    <httpHandlers>
      <remove verb="*" path="*.asmx"/>
      <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
      <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
      <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
    </httpHandlers>
    <httpModules>
      <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
      <add name="CuteWebUI.UploadModule" type="CuteWebUI.UploadModule,CuteWebUI.AjaxUploader"/>
    </httpModules>
  </system.web>
</configuration> 

 

Error Msg:

Server Error in '/' Application.
--------------------------------------------------------------------------------

Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. 

Parser Error Message: The format of the file 'System.Web.Extensions' is invalid.

Source Error: 


Line 42:     </httpHandlers>
Line 43:     <httpModules>
Line 44:       <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
Line 45:       <add name="CuteWebUI.UploadModule" type="CuteWebUI.UploadModule,CuteWebUI.AjaxUploader"/>
Line 46:     </httpModules>
 

Source File: c:\inetpub\wwwroot\web.config    Line: 44

Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Web.Extensions' could not be loaded.


=== Pre-bind state information ===
LOG: DisplayName = System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
 (Fully-specified)
LOG: Appbase = file:///c:/inetpub/wwwroot
LOG: Initial PrivatePath = bin
Calling assembly : (Unknown).
===

LOG: Publisher policy file is not found.
LOG: No redirect found in host configuration file (C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet.config).
LOG: Using machine configuration file from C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\config\machine.config.
LOG: Post-policy reference: System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/root/2135a508/8d69a834/System.Web.Extensions.DLL.
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/root/2135a508/8d69a834/System.Web.Extensions/System.Web.Extensions.DLL.
LOG: Attempting download of new URL file:///c:/inetpub/wwwroot/bin/System.Web.Extensions.DLL.

 


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2504; ASP.NET Version:1.1.4322.2505  

Upload hangs in IE11 standard mode, works in compatibility mode

$
0
0

I downloaded 'AjaxUploader 3.0 2014-03-13' to solve our compatibility issues with IE 11.

 

I am testing wIth a net_cs/samples/simple-upload.aspx

When I upload a file in IE11 standards mode, the uploaders stalls about 19%.

I can still cancel the upload. 

 

When I add my domain to the IE11 Compatibility View Settings, the upload works without a problem.

 

I have tested this on two different machines. 

 

Complete Javascript API

$
0
0

I can see the samples using Javascript functions that are not documented in the accompanying chm.

 

Is there a place where all the available javascript functions are documented?

 

Thanks.  


html 5: The upload task is interrupted

$
0
0

Just started getting this error for large uploads after I deployed March 13 2014 version of AjaxUploader.

It is happening with FF, Chrome and IE.

Have reverted back to Nov 8 2013 version - which has been working stably for Chrome and FF.

Will let you know if that fixes the problem 

 

Customize Appearance of Button and Progress Panel

$
0
0

I'd like to do the two following things:

 

1) Customize the Button control that is clicked to begin select files and to begin uploading.  I've attempted the following code:

 

    upl_AjaxUploader.TempDirectory = "~/uploads"   'upl_AjaxUploader.InsertText = "Upload File (Max 10M)"
   upl_AjaxUploader.InsertText = "Test1"
   upl_AjaxUploader.ValidateOption.AllowedFileExtensions = "*.mp4,*.jpg,*.gif,*.png,*.bmp,*.zip,*.rar"
   upl_AjaxUploader.ValidateOption.MaxSizeKB = 5000
   upl_AjaxUploader.FileTypeNotSupportMsg = "bad file type"
   upl_AjaxUploader.FileTooLargeMsg = "file too large"
   upl_AjaxUploader.ShowProgressBar = True
   upl_AjaxUploader.ShowProgressInfo = True
   upl_AjaxUploader.InsertButtonID = "btn_Upload"
   tcell_Image1.Controls.Add(upl_AjaxUploader)
   
   Dim btn_Upload As New Button
   'btn_Upload.Enabled = False
   btn_Upload.ID = "btn_Upload"
   btn_Upload.Text = "Test2"
   btn_Upload.Width = 500
   tcell_Image1.Controls.Add(btn_Upload)

 

However, the result is strange - I see what looks like a default button with the word "Upload" on it, and neither of the buttons mentioned in the code should say only "Upload".  Also, the width is uncontrollable even though it's specified in the custom button.  What am I missing here?

 

2) The progress panel looks and works great.  But, for small files, it goes away too quickly, such that it can't be read.  Is there a way to get the progress panel to stay visible a longer amount of time?

Does different UploadType options in Ajax uploader affects upload performance?

$
0
0

Currently we are using UploadType = "Flash". Are there any side effects of using UploadType = "Auto/IFame" etc? Are all of the UploadType options supported on all the browsers? Are there any pros & cons of using other options than Flash? Will it impact upload performance? 

FileUploaded event not firing

$
0
0

Hi, Kennth:

 

I have a new issue with the Ajax Uploader that seems to have begun after not using it for a few months.  For some reason, after the file is selected and uploaded, the file shows up in the temp directory as a persisted file object with extension ".resx", but the FileUploaded event (which will copy the file to a new location) doesn't fire afterwards.  Not sure why this isn't working anymore when the code hasn't really changed - I'm wondering if I'm missing another object, such as Ajax-related objects, or license is expired or something (I originally downloaded it in July 2014).  My implementation has:

 

1.  In my first page: 

<%@ Register TagPrefix="CuteWebUI" Namespace="CuteWebUI" Assembly="CuteWebUI.AjaxUploader" %> 

 

2. Declaration and properties:

Public upl_AjaxUploader As New CuteWebUI.Uploader

upl_AjaxUploader.ID = "upl_AjaxUploader"

upl_AjaxUploader.TempDirectory = "~/uploads"

upl_AjaxUploader.InsertText = "Upload File (Max 10M)"

upl_AjaxUploader.FileTypeNotSupportMsg = "bad file type"

upl_AjaxUploader.FileTooLargeMsg = "file too large"

upl_AjaxUploader.ShowProgressBar = True

upl_AjaxUploader.ShowProgressInfo = True

upl_AjaxUploader.InsertButtonID = "btn_Upload"

upl_AjaxUploader.CancelButton.Visible = False

AddHandler upl_AjaxUploader.FileUploaded, AddressOf Uploader_FileUploaded 

 

3. Event handler:

Sub Uploader_FileUploaded(sender As Object, args As CuteWebUI.UploaderEventArgs)

response.redirect("www.google.com") 'using this to test if Sub is firing

'more code here to copy file, omitted for brevity 

End Sub

 

4. Java-script: all commented out. 

 

I swear this was working before without a problem, but not anymore.  I'm wondering if there's a postback not occurring, or an Ajax-related object missing, etc.   Why do I see the persisted file in the temp directory and the FileUploaded event doesn't fire?  Any help is greatly appreciated.

html5: the upload task is interrupted

$
0
0

Hi support,

 

I received the error message  html5: the upload task is interrupted while uploading small files. Is there any way that i can see the log files?

 

Thanks.

 

Regards,

Fadhli 

Page Posts (IsPostBack==false) when manually starting Upload

$
0
0
I'm new to this control and am having some trouble getting it working. I am running the Start-uploading-manually.aspx sample. And while it functions OK, I noticed that the page containing the uploader control is posted to (with IsPostBack==false) when the upload begins. I am trying to integrate this control into an existing page and the (re)post to the page is causing it to be drawn as if it were the first request, which is not what I want.
 
Is this expected behaviour for the control? Is there any way to stop this from happening?
 
Thanks
js

CuteWebUI AJAX Uploader: Support for IE 11

$
0
0

Hi,

 

IE 11 is still in beta version but we're already testing our website to make sure everything works when IE 11 rolled out in the market.

CuteWebUI AJAX Uploader doesn't work in this version. The method under OnFileUploaded property is not run while on debug and the upload button duplicates.

 

Is this a known issue? Approximately when will the uploader be properly supported in IE 11? I know this is a new browser version but I just want to report the issue and have an idea when it will be working on our website. Thanks in advance :)


Using camera on mobile devices to take a photo

$
0
0

I'm trying to enable the camera selection while browsing for files on mobile devices.

 

For example when I'm using the following html code:

 <label for="image3" class="btn btn-default">

        <input id="image3" type="file" accept="image/*" name="fImages" class="m_none" style="display:none" capture>

         <span class="glyphicon icon icon-camera"></span> Take / Upload Photo

  </label>

Then the mobile device will show the camera options.

 

I'm trying to achieve the same with CuteWebUI.MvcUploader, but with no success (

The html looks like this

     <span id="Uploader1Insert">

                                <span tabindex="0" class="group-span-filestyle d_none">

                                    <label class="btn btn-default">

                                       <span class="glyphicon icon icon-camera"></span> Take / Upload Photo

                                    </label>

                                </span>

    </span>

 

 @{

      using (CuteWebUI.MvcUploader uploader = new CuteWebUI.MvcUploader(System.Web.HttpContext.Current))

      {

            uploader.UploadUrl = Response.ApplyAppPathModifier("~/UploadHandler.ashx");

            //the data of the uploader will render as <input type='hidden' name='myuploader'>

            uploader.Name = "myuploader";

            uploader.InsertButtonID = "Uploader1Insert";

            uploader.MultipleFilesUpload = true;

            uploader.AllowedFileExtensions = "*.jpg,*.jpeg,*.png";

            uploader.MaxSizeKB = 4 * 1024;

            uploader.ManualStartUpload = false;

            @Html.Raw(uploader.Render())

      }

<script type="text/javascript">

   

      function CuteWebUI_AjaxUploader_OnInitialize() {

            var hidden = this;

            hidden.internalobject.addonobject.accept = "image/*";

            hidden.internalobject.addonobject.capture = true;

      }

</script>

 

 

Uploader Button was disabled in IE 9 but Working in IE 10 hosted in SharePoint 2013

$
0
0

Hi we have new MVC 4 Application hosted in our SharePoint Site 2013. We are having an issue when the Application was accessed in IE9 the uploader button was disabled but when it is accessed in IE10 there is no problem. Im already using the latest version of ajax uploader.

 

I added below code on the head tag of my sharepoint master page and my mvc _layout mater page.

 <meta http-equiv="X-UA-Compatible" content="IE=8,IE=edge,chrome=1"/>

 <meta http-equiv="Pragma" content="no-cache"/>

<meta http-equiv="Expires" content="-1"/> 

 

Below are my code in Controller:

 

  using (CuteWebUI.MvcUploader uploader = new CuteWebUI.MvcUploader(System.Web.HttpContext.Current))
                    {
                        uploader.UploadUrl = Response.ApplyAppPathModifier("~/UploadHandler.ashx");
                  uploader.Name = "UploaderQA'
                        uploader.AllowedFileExtensions = fileExtensions;
                        uploader.MultipleFilesUpload = true;
                        uploader.InsertButtonID = "btnUploaderattachment";
                        uploader.ButtonOnClickScript = "buttonClick('#Uploader_QA')";
                        ViewData["UploaderAttachmentHtml"] = uploader.Render();
                    } 

 

I also noticed that  the allowed file extension is no longer working in IE10.

 

Please help.  

 

 

 

I'm using Ajax Uploader v3.0. and want to implement drag and drop.

$
0
0

I'm using Ajax Uploader v3.0 and I have my own custom implimentation of drag and drop, but I would like to add the files from HTML5 "dataTransfer.files" to the Ajax Uploader queue. 

 

What is the javascript API call to add the files to the upload object?

 

[AjaxUploader 4.0] Image name when uploading from iPad or iPhone (thus from iOS)

$
0
0

(AjaxUploader 4.0)

 

When uploading images from iPad or iPhone, the AjaxUploader always names the image "image.jpeg". That's regardless of the real filename of the image being uploaded.

 

When uploading from Android or Windows, there is no problem. 

 

What causes this iOS issue, and how can we prevent it? 

Unable to cast object of type ‘System.Boolean’ to type ‘CuteWebUI.UploadModule’

$
0
0
Getting this error right after file upload completes.. Then the uploaded file is flagged as 'Cancelled'

Unable to cast object of type ‘System.Boolean’ to type ‘CuteWebUI.UploadModule’

 

 

Any ideas? 

Viewing all 132 articles
Browse latest View live