Welcome Guest Search | Active Topics | Sign In | Register

AJAXUploader graceful degrade when JS disabled Options
trystanc
Posted: Thursday, October 4, 2007 2:19:57 AM
Rank: Member
Groups: Member

Joined: 10/4/2007
Posts: 15
Hi,

I notice that when JavaScript is disabled the AjaxUploader does not work at all. In IE the input type=file control was hidden. In Firefox the whole page froze.

It would be nice if the control could degrade gracefully e.g. just render the standard asp.net upload control.

Thanks

Trystan
eo_support
Posted: Thursday, October 4, 2007 6:15:18 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,083
Hi Trystan,

Thanks for the suggestion. The problem for doing that is standard ASP.NET uploader can not handle big files, and most of the time user chooses our uploader is for uploading big files. So even if we were to default back to the standard ASP.NET file upload control, the uploading process would still likely to fail later when user actually submit the upload. But we will look into it and see what we can do.

Thanks
trystanc
Posted: Friday, October 5, 2007 1:33:55 AM
Rank: Member
Groups: Member

Joined: 10/4/2007
Posts: 15
Hi,

Thanks for looking into it. I understand that the standard asp.net file upload cannot handle big files and that is why I am looking at your control. At the moment I am undecided about whether we force users to have javascript enabled or not.

I was thinking that we could still allow users to upload without javascript but set the size limit quite low, say - 30 - 50 mb. This can be done by setting the httpRuntime maxRequestLength in a local web.config in a directory holding the upload page, as your control bypasses this it could still upload large files when enabled but when falling back to the asp.net control it will have a reduced limit and we can warn the users within the <noscript> tag.
eo_support
Posted: Friday, October 5, 2007 6:20:00 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,083
Hi Trystan,

I believe you can always use <noscript> with the current version. Since it's not built in with the control, it requires a little bit extra code. But it's fairly easy to do:

Code: HTML/ASPX
<div id="uploaderDiv" style="display:none">
    our uploader goes here
</div>
<script type="text/javascript">
document.getElementById("uploaderDiv").style.display = "block";
</script>
<noscript>
   asp.net file upload goes here
</noscript>


This way if script is enabled, you will see our control, if not, you will see the standard ASP.NET file upload control. One the server side, you can always check whether the ASP.NET file upload has any files, then check ours.

We are still hesitate about whether we should integrate this logic into our control because while an integrated solution may seem to be easier to get started, it would not have as much customization options as you would get without integration.

Please let us know if you have any other thoughts. We'd be happy to hear and consider.

Thanks
trystanc
Posted: Friday, October 5, 2007 7:23:37 AM
Rank: Member
Groups: Member

Joined: 10/4/2007
Posts: 15
Thanks, that looks like a good solution.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.