473,471 Members | 2,053 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

File upload size checking.

sun1programmer
12 New Member
Hi All,

I have an HTML File upload control and I want to check the size of uploaded file by the user at the time of uploading. If size exceeds 25MB, then it shows the confirmation message that "File size exceeds 25MB. Do you want to continue anyway". If user clicks on OK button then the file is uploaded else not.

I found many solution but all have some limitations.

Please try your codes before posting.


Thanks & Best of luck.
Sunil Rathore
Aug 9 '07 #1
2 1358
RedSon
5,000 Recognized Expert Expert
Hi All,

I have an HTML File upload control and I want to check the size of uploaded file by the user at the time of uploading. If size exceeds 25MB, then it shows the confirmation message that "File size exceeds 25MB. Do you want to continue anyway". If user clicks on OK button then the file is uploaded else not.

I found many solution but all have some limitations.

Please try your codes before posting.


Thanks & Best of luck.
Sunil Rathore
This website is not a place to trade code or to ask people to do your coding work for you. If you have a solution but it is limited and you want to expand its functionality you can give a detailed explanation of what you would like it to do. You can explain what you did to try to get it that way. And you can explain where you are currently stuck and then we will help you.
Aug 9 '07 #2
Plater
7,872 Recognized Expert Expert
The only methods I have seen for tracking filesize prior to uploading is to use some sort of activeX type object that a user must install.
I don't think javascript has file IO rights on it's own and the server won't know until it receives the file.
(Even google makes you wait until it's received up to it's limit before telling you it won't accept the file)
Aug 9 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Jonathan | last post by:
Hi everyone, I have a problem with the file uploading in Asp.Net and I have read a lot on forums on this but never found an answer. Here is the problem: I know Asp.Net maximum Length for...
6
by: Thomas Due | last post by:
Hi, I am writing an ASP.NET project where I allow users to upload files to the server. I have changed to web.config to allow a total file size of 100MB. My problem is that if the total file size...
14
by: Al Smith | last post by:
I need help in implementing proper error handling. I am trying to upload a file based on the sample code below. The code works well except if the file selected is too big. I do know about the...
4
by: Matt Jensen | last post by:
Howdy I've got a rather strange issue occuring. I used forms based .NET authentication, although I'm also setting some session variables when people login. However, I've found when people use...
1
by: gryffin | last post by:
im trying to do file extension checking but its not working :( i have the following in the head <script language="JavaScript"> extArray = new Array(".jpg", ".png", ".bmp"); function...
3
by: Jefferis NoSpamme | last post by:
Hello all, I'm trying to limit the file size to 1 meg on upload of image files and I am trying a script from javascript internet, but it is giving me errors on IE ² is null or not an object ³...
5
by: Jefferis NoSpamme | last post by:
Hi all, I'm trying to limit the file size of an image submission and I keep running into various problems. I've got most of it working, but I'm stumped and I have a basic question as to WHY this...
3
by: puja | last post by:
hi all, In asp.net 2.0 there is a limit on file size upload of 4MB. I know this limit can be increased in web.config file. Is there any way to check the file size before upload ? if user is...
1
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Many websites have a form or a link you can use to download a file. You click a form button or click...
2
by: jeddiki | last post by:
Hello, Hopefully I can do this with php I want to allow my clients to upload their pdf or video files to my server without giving them ftp login details. Lets look at PDF's first: This...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.