Forum Moderators: open

Message Too Old, No Replies

Download Dialog

Limitations?

         

RainMaker

9:25 pm on Jun 2, 2003 (gmt 0)

10+ Year Member



I have been working on a web page that opens a file using the <input type="File"> tag. upon click it will open a download or open dialog box like in standard windows which I am sure that all of you know. Anyways, I am selecting exclusively images and nothing but that. I am not sure if this issue is with all files or not I just know that it exists with images and would ASSUME that it works with all files.

When I select a File from the dialog, whether it be from a remote source or local source, or no matter how long the file name is, IF it's over 4.093 megs ASP.NET will not display the page. What I am doing is, I have a regular image control that I plan to set the .ImageUrl for during runtime. I want to set this property with the open dialog box that appears when I click on it. Well I did some logging and it seems that when I goto run an event such as a regular button, it wont set the property of the image control if the file size is above 4.093. I did some more logging, and I noticed that it would display an image at 4.092 but not one that is 4.097. Unfortunatly I don't have images that are between there BUT I do know that somwhere between there Open dialog will not handle a file this big. How this open file dialog should work is that when it is clicked you should be able to go out and get this file that you want and then after that it should just get the path of that file name. THAT is it. BUT for some reason if it is too big the event that you want to set the property to will not even be called. Page load won't even be called....what up with that?! Thing is, is that open dialog (or the control <input type="file">) somehow realizes a file size and will not send back to the server, or the server gets it from dialog and doesn't want to processs it. So my quesion is, is that has anyone recalled an isntance of this? Is there a way to intercept the data between open dialog and the server? Can anyone give me documentation on this possible bug? or better yet, has anyone encoutered this and has found a work around? Any suggestions, whifs or frustrations would be greatly appreciated. This forum has inspired me to stick with it, and seek for external resources. Thank you all!

threecrans

1:57 pm on Jun 3, 2003 (gmt 0)

10+ Year Member



I have used the input type=file mechanism in ASP.NET to upload many types of files with many sizes. Are you running into the ASP.NET-imposed request size limit? ASP.NET puts a cap to the maximum request size, I'm not sure what it set at. You can extend it by modifying your web.config, i.e.

<httpRuntime maxRequestLength="102400" />

I think the maximum you can extend this is to 2 GB, but someone may correct me here.

RainMaker

2:53 pm on Jun 3, 2003 (gmt 0)

10+ Year Member



threecrans you are a genious! It worked and I can fully do my thing now. I couldn't thank you enough! Thanks everyone that has read this.!

RainMaker

3:00 pm on Jun 3, 2003 (gmt 0)

10+ Year Member



The 102400, what unit is that in? Megs?

threecrans

4:17 pm on Jun 3, 2003 (gmt 0)

10+ Year Member



The units are in kilobytes, I believe, so my example extended the maxrequestlength to 100 MB.

RainMaker

4:38 pm on Jun 3, 2003 (gmt 0)

10+ Year Member



Great, thanks again!