HTML - Restricting File Uploads
well long story short someone sent a virus through a clients file upload and the amdin wants to setup a file restriction on the types of files that can be sent in...they want to limit it too .doc and .xls files, how could this be done
below is the current code for the file upload: Code: <input name="resume" type="file"/> Similar TutorialsHi guys and thanks for reading my post. I am a novice HTML web developer so everything is new to me. Recently I've been really frustrated with IE's script blocking feature. I have been using onmouseover feature that triggers the buttons to change image. I have the script all working and tested in FrontPage, however, any time I go to view the web page, Internet Explorer gives me that little message saying: "To help protect your security, Internet Explorere has restricted this file from showing active content that could access your computer. Click here for options..." I have gone to other web sites which use plenty of onmouseover feature however, and I don't get this message. How are they doing it??? Is there a way to tell IE that the script is harmless or something? Am I using some method that IE says is dangerous? Anyway this is my code <a href="index.html" onmouseover="image0.src='HomeA2.jpg'" onmouseout="image0.src='Home.jpg'"> <img src="Home.jpg" name="image0" border="0" height="42" width="120" alt="Tell A Friend"></a> Anything i can change to prevent IE from blocking it? Please advice me. Greatly Appreciated. Thanks for reading anyway. Is there any way I can restrict incoming URLs to ONLY one, and redirect it to something else if it isn't from that page? <3 KTHXBAI Hi, I am trying to restrict access to a certain page on my website. I don't really want to set up a username and password, instead of was thinking of the following 2 things to verify. #1: would be for them to enter an email address that ends in either "@weber.edu" or "@mail.weber.edu". #2: would be for them to have to enter an identification number which must start with a "w" and must have 8 numbers after the w. No more, and no less than 8 numbers. For example: Email address: jay@mail.weber.edu Identification number: W01234567 If those two conditions are met, then they can have access to the page. Any clue how to write the code for that? Thank you very much! Hi, Wondering what are some good ways to restrict access to files / links for a visitor until they have registered their details... for example, when a user tries to access a certain file from a download page, they click on the file link >> I want to send them to a registration page (a simple form), and - only once they've filled it out and submitted their details - to send them back to the download page with unrestricted access to that file (or any other resitrcted files). Any suggestions / pointers would be greatly appreciated. Thanks, After hours of figuring out position absolute and position relative code and putting it in a nice div section, I got what I wanted. I previewed my page in my web browser (IE8). I was trying to overlay text on a graphic. It looked perfect. Then I uploaded it to my server and went to my website (again in IE8). None of the words were properly lined up. They were too high and too far to the right. Does anyone know why this would be? I ended up just putting my old pages back up.... I thought some screenshots would be helpful: The first one is how it looked from my harddrive; the second one is uploaded to my server: Hi, i'm making a website for sim city 2000 (yes I know this is an old game) and I wanted to know if anyone has an html code that would enable user uploads so that I could allow users on my site to upload their cities and tile sets? If someone has the code I would greatly apprecieate it if they would share it with me. thanks. The following common code is not working in Firefox (3.0.11). It works in Safari (4.02) and IE7. When I say not working, I mean that when I click the submit button, the address does not change to the form processing url: Code: <!-- The data encoding type, enctype, MUST be specified as below --> <form enctype="multipart/form-data" action="uploader.php" method="POST"> <!-- MAX_FILE_SIZE must precede the file input field --> <input type="hidden" name="MAX_FILE_SIZE" value="30000" /> <!-- Name of input element determines name in $_FILES array --> Send this file: <input name="mp3file" type="file" /> <input type="submit" name="submit" value="Send File" /> </form> The file uploader.php does nothing, it is blank, I'm merely trying to establish communication. Once again, the code functions in IE and Safari so I dont think this is PHP related. I have a project written in ASP.NET under Visual Studio 2005 with C#. I am also using Infragistics objects for .NET Advantage 2007. In my page to attach resources to a record I have written a browser and am displaying previously chosen resources here. But when I click the upload button the page opens a new window (which is not a dialog window, but a normal one) which is exactly the same as my dialog window. How can this possibly happen? Can anyone help me? Hi ,I am new in html.Hope you can guide me step-by-step on this. I want to import my .txt file into the html form and the html form can add new item then to be add in to that particular .txt file too as well. can this be done? For example: (fruits.txt) 1.apple 2.banana 3.orange Can this fruit.txt be impoted to fruit.html page and show it at fruit.html page, at the same time, the fruit html page allow to add in new fruit, and once user add in new fruit, the fruit.txt file will be updated as well. Thanks for your guidiance and help. :-) Hi, Anybody have any idea how to convert a xml file to excel file.Actually i m working on visual studio and using C programming language.I have a xml file in the same directory where my programm is running.When i pressed a icon it will take the xml file automatically and convert to a excel file and show the outpt to the user.How can i achive this goal ??? Any help would be great. Thanks, Basanta I have a website where I want to make a drop down menu that will bring you to different pages. It is a very basic, sort of old-fashioned website that relies entirely on html. What I'm trying to do is make a drop-down menu that will be used as navigation for a section of a website and I want to have it in each internally linked page in that section, but I'm going to be adding more pages to it over time so I want to be able to put the drop-down menu code in a separate text file and then substitute it into the pages that I make that the options in the menu link to and then just edit the code in the text file when I add another page so that I don't have to go back and edit the code every single individual page whenever I add a new one among them. Basically all I'm asking is how I can put html code in a text file and then substitute that code into an html page by referring to the file. Thanks in advance for any help. hi everybody, I am working in a html. I defined a functiion in a html file.(first.html) I want to call that function in another html file.(second.html) How can i call that function in second.html file? give some sample code Thanks in advance.... Hi guys I want to add some php files into my frontpage html files, please let me know how to do this. I tried many things but fail. Please guide me. Thank you GCS Hi, I'm trying to include one HTML file in another. I tried iframe and was displeased with the results, I want the size of the frame to change dynamically and not just scroll. Fair warning, my knowledge of JavaScript is non-existent >_> . Basically, I have a document written in HTML (please don't suggest a wholesale re-write, that's simply not practical) and the idea is to have one file where it makes sense to include it several times. One thing to mention, this document is not meant to be shown on a web-server, but in a browser while you're reading it off your hard-drive. Here's what I have so far. main.shtml Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>test</title> </head> <body> <center> <h1> This is only a test! </h1> </center> <p> Still testing!!!!! </p> <!-- #include file="included.html" --> <p> Even more testing!!!!! </p> </body> </html> included.html Code: <!--<html> <head> <title> asdfasdfasdfasd </title> </head> <body>--> <p> <h4> foobar </h4> <br> <br> <br> <br> <h4> boofar </h4> </p> <!--</body> </html>--> Not sure what I'm doing wrong, help appreciated! I'm having some trouble that I've never encountered before... I'm trying to get a ".jpg" file that's being loaded from a FTP server to load up on a ".php" file. It all works when I do it locally, but when I try to open it up on the server itself, all the images (".gif"'s) open up perfectly yet the ".jpg" doesn't. Any suggestions? Thanks! hi everyone! how can i upload a pdf file via html? i guess "a href" is not the right way. please help me. thank you Hi All I need some help with the following html coding: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!-- MagicComment: MVTimeout --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Untangle Login</title> <script type="text/javascript">if (top.location!=location) top.location.href=document.location.href;</script> <style type="text/css"> /* <![CDATA[ */ @import url(/images/base.css); /* ]]> */ </style> </head> <body> <div id="main" style="width: 500px; margin: 50px auto 0 auto;"> <div class="main-top-left"></div><div class="main-top-right"></div><div class="main-mid-left"><div class="main-mid-right"><div class="main-mid"> <!-- Content Start --> <center> <img alt="" src="/images/BrandingLogo.gif" /><br /> <b></b><br/> Untangle Login <div style="margin: 0 auto; width: 250px; padding: 40px 0 5px;"> <form method="post" action= "/auth/login?url=/setup/welcome.do&realm=Administrator" > <table><tbody> <tr><td style="text-align:right">Server:</td><td><em> localhost</em></td></tr> <tr><td style="text-align:right">Username:</td><td><input id="username" type="text" name="username" value="admin"/></td></tr> <tr><td style="text-align:right">Password:</td><td><input id="password" type="password" name="password" /></td></tr> </tbody></table> <br /> <div style="text-align: center;"><button value="login" type="submit">Login</button></div> </form> <script type="text/javascript">document.getElementById('password').focus();</script> </div> </center> <!-- Content End --> </div></div></div><div class="main-bot-left"></div><div class="main-bot-right"></div> <!-- Box End --> </div> </body> </html> What I need to know is how can I change the title. I cant seem to find the file contaning the html coding that i posted above. the way i found this coding was 'right clicked the web page and clicked on view source' The code that I marked in red seems to be the "file"(welcome.do) that contains this code, but i cant seem to find the file. Please, any help will be appreciated Best regards Hey all, My second question from the 'could be done another, easier way, but I want to do it like this' pile (I am really trying to avoid PHP..) At the moment I have created a basic website (just for funsies, and a little bit of learning) using CSS and such - nothing too complicated. I had a bit of a look around and found a basic script that would allow me to username / password protect the site, though I noticed that the username / password was stored in the HTML itself, so it sort of makes it useless. This got me thinking about more secure ways to do it, and I thought that if I could store the username / password combinations in a CSV file, and then check through that list on submit, that would be ok? So, firstly, is it possible to do it like this? Secondly, how would I go about doing it? I am probably in way over my head, but I will never know if I never try! Thanks in advance. ~J could some one please tell how to upload a file without using the submit button. Iknow the location of the file and i want to upload the file into the server Hi, I want visitors to be able to download files (.mp3) from my web site . I've looked through some of the posts on this and some seem to say just use something like: <a href="http://yourdownloadfile.mp3">Download This</a> others mention php. What is the best to use? Do I need php? Thanks |