Print Page | Close Window

jpg or JPG??

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=2295
Printed Date: 29 March 2026 at 1:25pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: jpg or JPG??
Posted By: venki
Subject: jpg or JPG??
Date Posted: 29 April 2003 at 12:37pm
I have problem whit asp upload that there is a asp check for jpg and it works OK, but if file is JPG it wont open the page. How to change JPG to jpg? and other files, ZIP, RAR, JPEG, BMP, GIF, PNG...



Replies:
Posted By: Mart
Date Posted: 29 April 2003 at 2:04pm

You could use a code similar to this, when you upload files it will make sure all extenstions are lower case by using this code.


Dim extension
Dim File
File = request.form("File")
extension = lcase(right(File, "3"))

Then when you specifie the filename it will be somthing like "new-upload." & extension

Martin.

p.s you can change JPG to jpg lcase(string)

 



Posted By: venki
Date Posted: 04 May 2003 at 7:39am
thanks, Mart for LCase



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net