Restricting File Uploads
here is the code for the asp that basically handles the uploads, how could change it so that the uploading form will only allow .doc or .xls files? Code:
View Replieshere is the code for the asp that basically handles the uploads, how could change it so that the uploading form will only allow .doc or .xls files? Code:
View RepliesI've got a form that allows someone to upload a file. I need to know how I can grab the filename from the uploaded file information so that I can store it in a database. I also need to be able to move the uploaded file to a specific directory.
I'm new to both ASP & VBScript but I have both of their "In a Nutshell" O'Reilly manuals. There's no mention of file uploads in the ASP book and I'm just not sure if the info in the VBScript book is what I need either.
Do I need to create a File object? If so, how can I use GetFile to retrieve the downloaded file? Do I access it via Request.Form("filename")? That should be the actual file, right? But how do I get the actual file name from that?
Can someone help me out in multiple file uploads.
I want the user to select multiple files. On selecting the listed files, he can
click on open and all the selected files should appear in a textbox. On clicking a
button upload, all the listed files should upload.
I am building a form page to send information to email using CDONTS and id like to add a page that will use forms and allow users to attach documents such as resumes etc and then populate this data into a database....what would be the best route to begin a system such as this....
View Replies View RelatedI have a site that i upload files to that are no bigger than 100MB. we upload about once a day, and use FTP...... we would like to be able to do it from the site itself.
any idea where i can get a script? i cant register components with my
hosting company i dont think. i go thru godaddy.com
need a good free asp upload script. cant find any that work. Huge ASP Upload
doesnt even work on the demo page, let alone on my own page
I've recently installed an asp component called smartupload, it works very well. The problems start when a mac user uploads a jpg or gif, windows will not open the file.it works fine with a windows user.
View Replies View RelatedI am using the FCK Editor.but i need to be able to upload folders win information in.is there a way of doing this?
View Replies View RelatedI am running a contest in which people can vote for a villain, but I had to take it down to figure out a way so people are only allowed one vote (at least per day or something) Does anyone know a way that I can restrict access to the people voting to one per day? I know how to get the users IP address through ASP, maybe something to do with that?
I am short on time for this
I have a Textfield input for an amount of money and wish to restrict this to two decimal spots any ideas ?Code:
<input name="amount" type="text" maxlength="10" id="amount" value =<%= amount %>>
I have been tasked with producing a script that times the amount of time it takes to upload a file from client to server.Unfortunately for me, part of the spec is that the script must be written in ASP which is something I have about 30 minutes experience in.
I have been playing around with the script located at this address :
http://www.asp101.com/articles/jacob/scriptupload.asp
Which does almost everything I need, the only thing it doesnt do is tell me how many seconds/milliseconds/widgets it took to upload the file to the server (excluding time to write to disk once received)Can anybody point me in the direction of another script that can give me timings, or at least give me some pointers on how I can hack the above script to give me the data I need (I have already worked out how to get rid of the save to DB and user name option and this is now gone from the display page and the working scripts behind it)
I've created a search page that gets complete addresses based on postcodes, and name, suburb and address.Almost 6000 entries in the db.I want to limit the amount of times a user can search, i tried cookies but anyone can delete cookies and off they go again.The reason behind this is to prevent the opposition from collecting stuff and cold calling them.
View Replies View RelatedIf I were to write an application in ASP and sell it to a business, can i restrict people from installing it on multiple servers?
View Replies View RelatedI have a .asp page which is protected by a username & a password. Only people having the required details can view that but I wanted to know is that possible somehow that even if the user has username & password he should not be able login from every machine but only through machine from where we authorise.
The IP address of that machine will not be static so i cannot make restictions through that.
Just reading from a previous thread about multiple uploads.
I wanted to use script to create multiple input file elements that put the path in as a default (or something like that) based on ASP code. My problem was that the input file value property is readonly and there is no default value.
The thing is you can cut and paste a path manually (ctrl-c,v) but I couldn't work out how to do it from code. I thought that anything that you could do manually you could pretty much do with code.
I'm trying to limit access to certain portions of our intranet application from certain user levels. For example, an admin user would have full access to the site while a data entry users could only access small portions of the site. What is the best way to restrict pages? I have a UserLevel field in the database for each user and have already added this value into a session variable. What about pages that should allow Admins and Managers, but not data entry users? I am using a SQL Server 2000 database .....
View Replies View Relatedhow can I in plain old ASP restrict a cookie to a folder like http://www.site.com/folder1 so that it is not seen by folder www.site.com/folder2?
View Replies View RelatedI'm doing a web page with Admin rights to a MS Access database. So far when the admin logs in they are directed to the admin page. However if someone knows the name of the admin page they can still type it into the address bar and it will pop up with no restriction. Any ideas how to restrict this access to administrators only?
View Replies View RelatedDo you have any experience with MS - Posting Acceptor?! or should I get one of those applets? If you have experience with setting up advanced user uploads please read on …
The ordinary HTML <input type=”file”> don’t allow any other info than the actual file. I have spent a couple of days trying to figure out how to allow my users to upload pictures. What I want to do is simple. I want to make sure that the picture is 1) either a gif or a jpg - and 2) max. size 100 kb.
But I need to handle the check client side (IIS 4) - like when some user decides to upload 2,1 meg file my server receives the whole file - and then inform him its too big =) I would rather check the file size when he browses his own HD.
I have been looking at the MS - Posting Acceptor. This component however is impossible to find on the net (well I tried and failed, so I guess it’s not on the net *cough cough*) You have to have some VB cd-rom it would appear. Code:
After a lot of head scratching, I've put together something I hope will be useful to others. Basically it allows multiple image uploads while limiting the type, size and dimensions of the images before doing the upload.
It uses three of Lewis Moten's classes: clsUpload.asp, clsImage, clsField.
My code (processupload.asp) is a bit lengthy, but it works together with his to allow multiple uploads while checking dimensions. (hopefully someone can cut it down) It can be downloaded here: http://www.activeice.co.za/brett/image_uploads.zip (I have included the class files for convenience)
Is there a way to keep an other application from opening a link in a
browser where I am running an ASP application?
For example, I have an ASP application open in a browser. If I click on
a link in an email message, Outlook "hijacks" the open browser and
opens opens the link in it. Is there a way to prevent this? To somehow
identifiy that browser window as "off limits" to another app?
I'm creating a web application for my company now. This application has 2
parts. 1 part for the customers to access. The 2nd part is for our staff to
access only. My director hopes to make the 2nd part to be something like an
intranet, such that only our company's computers (maybe only 1 or 2 in the
company) can login to this part of the application.
1. My company's intending to put the application on shared server with a web
host. Windows Authentication is NOT allowed.
2. My company doesn't have a static IP address.
3. My manager suggested using Network Card number (which I don't really
quite understand. Is there a way to get the Network Card number that's on a
client PC?).
How??
Some ISP told us that they can provide a firewall management feature such
that it will restrict access to the website from anyone that is not coming
from my company's network. This requires Static IP.
Another told me that IIS Manager has the security feature that restrict
access based on IP address. This requires Static IP again.
Is it possible to implement the 2nd part (the part that is to be accessed by
my company's PC) as a windows application instead? Then we only put the
windows application on one computer. So, 1st part (for the public) will be a
web application, 2nd part (for my company) is a windows application, both
accessing the same database server from an ISP. Will the ISP allow the
windows application to access its database server? I've no experience in
making a windows application at all, is it the same as making a web
application?
i'm converting an image file to hexa..then the hexa is saved to a text file..
can any one help me how to read the content text of a text file?...
im doing it this way because i don't want to save hexa in my database, because it makes the database slower to open up.
is there a way, using asp, to find out the width and height of an image file?
View Replies View RelatedI have code that loops through a directory reading files..
now the problem is that files are constantly being uploaded and I only want the file system object to read those that are finished being uploaded.
How can I check the properties of the file to see if it's in middle of being written before i read the file?
i am having a problem in how to create a Open File dialog to enable user to select a image file that will be stored into database. i just want the file path to be stored in database, not the image.
View Replies View RelatedIt works if the file in on the server side, how to use the component (DSOleFile) with the file on the client side? Also how can I calculate the width of the file. (Page set up - Landscape or porrait). Code:
View Replies View RelatedI need to do online streaming multimedia file on my web portal, just like those online portal that selling MP3. User need to click on the preview link to stream the audio file to listen before they decide to buy the file or not. How do i link my audio file in my web server to allow it to be stream? Totally lost on this function,
View Replies View RelatedThis question has to do with MS file search but it is happening only with
..asp pages, so I though someone programming with .asp pages has experienced
the same situation.
I'm trying to find .asp pages with a certain table name (i.e.
"renewalInfo" )
When I ran the search I get no results. I know that I have that string in a
couple of pages. My file system search engine is working fine with other
file types, like Word documents, Excel spreadsheets, etc.
I tried typing the string outside the <% %> tags and when I do the search I
get the file results, so it seems like if the search engine in my file
system was not searching inside the <%%> tags. Code:
I'm having a problem with the fact that I want to allow image files to be uploaded to a remote web server, as the hosting package the web site is on is IIS6 and has a default file upload size limit of 200kb. As it's a shared hosting package, the default limit cannot be changed for me unfortunately.
Anyway - i need to check the size of the file being uploaded, so i can notify the user and prevent them getting the default Microsoft error message page. The problem is that I can't implement a server side size check which works, using either Request.TotalBytes or load.getFileSize (with "load" being an object of my loader class). It seems that I can't carry out any of these operations when the file size is too large.
I'm trying to run the server.execute command inside a executed file. It doesn't work. Can anybody tell me why? I've searched all around and haven't found a reason. Could it be because it's not supose to work, or is the syntax diferent then in the first file?
It's something like this:
File 1
...
<%Server.Execute("File2.asp")%>
...
File 2
...
<%Server.Execute("file3.asp")%>
...
File 3
<HTML>
<body>
Hello!
</body>
</HTML>
Is this possible?
I am using the File System Object to create server side cookies and part of
the Function that I am writing deletes a file but I am getting a permissions
denied error on that line of code.
I am using Integrated security only on this site but how do I get the
IUSER_Machinename account to work with Integrated Security?
I have an asp page written entirely in jscript with a vbscript used as an include file which one variable on the page must access.
When the page runs, I run into jscript complilation errors when it tries to access the include file (since it is written in vbscript), and I can't figure out how to get the two to work together. How do you get both scripting languages to work on the same page?
if i got a file path as a variable say for Example:
c:folder1folder2folder3folder4file.txt (The Path could be any long)
how do i just store the Path of the file name and the file name seperately. like :
File Path=c:folder1folder2folder3folder4
File Name=file.txt