• We should now be fully online following an overnight outage. Apologies for any inconvenience, we do not expect there to be any further issues.

Need some help with ASP and HTML...

linkgoron

Platinum Member
Mar 9, 2005
2,598
1,238
136
So basically, I want users to be able to uploads pictures(jpg), and then make the server rename the file the an Autonumber.jpg. My DB is already done, but I'm not sure how to do it, and the tutorials I found from google didn't help...
Help would be appreciated,
Linkgoron.
 

DaveSimmons

Elite Member
Aug 12, 2001
40,730
670
126
What server side upload component are you using? You might check the forums for it.

If you can't set a filename in the component, your code could use the file api to copy / rename whatever name it chooses?
 

notfred

Lifer
Feb 12, 2001
38,241
4
0
Use an autoincrementing ID in the database, and after an insertion, rename the file to match the auto-incremented number.
 

linkgoron

Platinum Member
Mar 9, 2005
2,598
1,238
136
Oh lol, I'm using access, and I decided that every pic will just get an AutoNumber. Forgot to add that I guess...

Anyway, my problem isn't with the DB, but how to actually upload pics and renaming them with ASP... Basically I don't know the code to upload and rename files with HTML and ASP, and tutorials didn't help me...
 

DaveSimmons

Elite Member
Aug 12, 2001
40,730
670
126
Again, what server side upload component are you using?

Microsoft had one, check MSDN, and the one I've used (years ago) is Soft Artisans SA-FileUp. But you need to use -some- component to decode the multipart POST and extract the file.