why won't anyone help?

Results 1 to 3 of 3

Thread: why won't anyone help?

  1. #1
    Join Date
    Dec 1969

    Default why won't anyone help?

    Hi, <BR><BR>I recently managed to integrate a PUREASP Upload feature in the backend of my site. It works great. The only query I have is that within the same form, I wish to have another edit box that would allow me to upload a larger image of that thumbnail image. I am not sure how I can go about doing so. <BR><BR>The code that uploads the image: <BR>---------------------------------- <BR>If Uploader.Files.Count &#062; 0 Then <BR>For Each File In Uploader.Files.Items <BR>If (File.FileName&#060;&#062;cimageurl) AND (cimageurl&#060;&#062;"") then <BR>set fs=CreateObject("Scripting.FileSystemObject") <BR>If fs.FileExists(thepath & "\" & cimageurl) then fs.DeleteFile(thepath & "\" & cimageurl) <BR>set fs=nothing <BR>End If <BR>Next <BR><BR>For Each File In Uploader.Files.Items <BR>File.SaveToDisk thepath <BR>cimageurl=File.FileName <BR>Next <BR>End If <BR>I appreciate any help.

  2. #2
    Keith M Guest

    Default RE: why won't anyone help?

    Haven&#039;t used it myself... but from the code, it looks like you just create another input of type FILE....<BR><BR>&#060;input type=file name=FILE2&#062;<BR><BR>the For Each loop looks like it should deal with each file presented<BR>

  3. #3
    Join Date
    Dec 1969

    Default Becuz we don't have that component?

    I&#039;ve never even *heard* of it before. <BR><BR>So I have no idea what its capabilities are. Maybe you need to go ask the question of the creator of the component?<BR><BR>One thing that would help: Use a *meaningful* subject next time you post. Such as "Ways to use PUREASP upload component?" So that anybody else who might happen to have it would be more drawn to your posting.<BR><BR>I will say I don&#039;t understand why you need to go through the list of uploaded files twice. Why are you doing that? And why the "if" to start it off? The FOR EACH will simply execute zero times if there isn&#039;t anything to work with. And why create a new FileSystemObject each time through the loop? Ugh. HORRIBLY wasteful of resources! And your code that tests for cimageurl makes no sense to me at all. Where is the value of *that* variable set before you get to this code? SO why not simply:<BR><BR>Set fs=CreateObject("Scripting.FileSystemObject") <BR>For Each File In Uploader.Files.Items <BR>&nbsp; &nbsp; cimageurl=thepath & "\" & File.FileName <BR>&nbsp; &nbsp; If fs.FileExists(cimageurl) then fs.DeleteFile(cimageurl) <BR>&nbsp; &nbsp; File.SaveToDisk cimageurl<BR>End If <BR>Next <BR>%&#062;<BR><BR>But that&#039;s all speculative, just based on basic common coding practices. No idea if it makes sense with that particular component.

Posting Permissions

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