Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 24th, 2006, 07:36 PM
Registered User
 
Join Date: Oct 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to CarrATMCS
Default

Does anyone know how to modify this code to use username and password? The server I'm using will not allow FTP with out user name and password. Example

Server http:www.SomeSite.com
UserName: Me
Password: MyPassord

 
Old November 28th, 2006, 10:08 PM
Registered User
 
Join Date: Nov 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

1,How to limitation on file type? (e.g. Allow only"gif,jpg,png")
2,Why after upload the picture can't show?

Server:iis6, System:windows2003

 
Old November 28th, 2006, 10:34 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

;;;How to limitation on file type? (e.g. Allow only"gif,jpg,png")
BTW - dont forget .jpeg

I use JS, this function works a treat:

    function validate(formName,fieldName)
    {
       if (document.formName.fieldName.value=="")
       {
          alert('Click browse to select a file for upload to proceed');
          formName.fieldName.focus();
          return (false);
       }
       if ((/.(gif|jpe?g)$/i.test(document.formName.fieldName.value))==false)
       {
           alert('You may only upload .jpg, .jpeg, or .gif images (in case sensitive)');
           return (false);
       }
           return(true);
    }

I fire it like so:

<FORM NAME="updateForm" METHOD="post" encType="multipart/form-data" onSubmit="return validate(updateForm,File1);">

Your second question is a little tricky to answer with the limited ingformation you give.

Wind is your friend
Matt
 
Old November 5th, 2007, 03:57 AM
Registered User
 
Join Date: Nov 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Dear

I'm using this script its very nice but i'm facing problem when i upload file more than 1 MB the script stopped and i get error "HTTP 500 Internal Error"

Could you please help me to solve this problem
Mohammed Afifi






Similar Threads
Thread Thread Starter Forum Replies Last Post
Pure ASP Upload ozzii Classic ASP Professional 1 January 8th, 2007 06:41 PM
Upload file to server from ASP script crmpicco Classic ASP Components 2 June 14th, 2006 01:25 AM
asp file upload script having problems with MYSQL paulmcn Classic ASP Databases 0 September 16th, 2005 01:26 PM
PURE asp upload problem ., alert from Javascript kasanar ASP.NET 1.0 and 1.1 Professional 0 February 19th, 2005 10:06 AM
Problem with upload script jeremy108 BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 4 July 2nd, 2003 01:48 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.