I'm dying here

Results 1 to 3 of 3

Thread: I'm dying here

  1. #1
    Join Date
    Dec 1969

    Default I'm dying here

    I&#039;m trying to make a script that uploads an image to a folder.<BR>Users can upload two images and these images is uploaded to a folder that is made before the images is uploded to it. HOW?<BR>An other solution is that the images is uploaded to a folder and if the images name exists the script tells them to remane it and upload the images again.<BR><BR>Can anyone PLZ help. I&#039;m dying here.

  2. #2
    Join Date
    Dec 1969

    Default What's killing you?

    First problem -- use the FileSystemObject to check to see if the folder exists (FolderExists method). If it doesn&#039;t (returns False), use the FSO to create a folder (CreateFolder method).<BR><BR>Second problem -- use the FileSystemObject to check to see if the file exists (FileExists method). If it does, use the Response object to Write a message to the client (Response.Write) to tell them to rename the file.

  3. #3
    Join Date
    Dec 1969

    Default Not only

    are you dying but your confusing me hehehe!<BR>hese images is uploaded to a folder that is made before the images is uploded to it<BR><BR>Ok so lets start over shall we!<BR><BR><BR>Step 1)<BR>So, you want to allow your users to upload some image(s)<BR>Once these images are uploaded, you&#039;d like to put them inside a folder. Is that correct so far ?<BR><BR>Now, you mention that the users can upload two images. If they want, they can only upload one right ?<BR><BR>Can they upload more then two images ? I guess not otherwise you would&#039;ve mentioned it.<BR><BR>The reason I&#039;m asking doesn&#039;t change a thing. Its just so I can put on my resume that I&#039;ve teached ASP...you see nothing fancy...<BR><BR>Ok so Step 2)<BR>My first question is: Are you using an upload component such as SaFileUp or...whatever...? <BR><BR>Now, if you don&#039;t have an upload component then what are you using ? Are you using your own COM component ?<BR><BR>Either way, you need something(component) to upload these images into you folder.<BR><BR><BR>Step 3)<BR>In here, all you really need to do is save the uploaded file(s) and put them into a folder. Now be carefull, that folder must have the right permissions so that the ISUR_&#060;Machine_Name&#062; can save them there.<BR><BR>Now, as your saving the file(s) there you can always rename that file if it exist. You can use FSO(File System Object) or I&#039;m pretty sure that the component you use(unless its your own component) has a property that makes sure that the file doesn&#039;t already exist. You&#039;ll need to read on the component&#039;s documentation for that.<BR><BR>So thats it.<BR><BR>Oh and what was your original question again ?<BR><BR><BR>PS: You can have a look here: http://www.safileup.com/ for ASP examples.<BR><BR>Hope this helps!<BR>Sincerely<BR><BR>Vlince

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts