Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

zip file scan

Status
Not open for further replies.

thompom

Technical User
Dec 4, 2006
395
GB
Hi,

Have a file sharing site that allows only certain file types to be uploaded.
But i want to allow zip files that contain only certain file types - has anyone done this?

thanks
 
I haven't but a component like the one below can do it for you..


when the file is uploaded, check to see if the ext is ZIP by splitting the filename at the dot and getting the ubound value of the array.

If it is "ZIP" then use the component to unzip all the file and use the file scripting object to check their extensions - if any file fails the check, delete all files plus the zip and return an error to the user.

If everything passes, delete all the temp files, move the zip file to the location you want it to reside and return a success msg to the user.

Good luck!

--------
GOOGLE is a great resource to find answers to questions like "how do i..."

If you don't know exaclty what you want to do or what to search on, try Google Suggest: --------
I have recently been semi-converted to ensuring all my code (well most of it) works in both javascript and non-javasc
 
thanks vicvirk - will give it a go
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top