Skip to main content
August 13, 2008
Question

Error when uploading pictures

  • August 13, 2008
  • 5 replies
  • 470 views
We have a website where our client uploads pictures almost on a monthly basis. All of a sudden he has started getting error messages when uploading pictures, the error is attached. The weird thing is that we haven't made any changes to that website in years and I can still upload pictures from my computer and from other computers outside the network with no problems. I asked the client to switch to another computer and he was able to upload some pictures and then said that after about 20 he got the error message on that computer as well! I checked the form field name and it's correct.
    This topic has been closed for replies.

    5 replies

    September 4, 2008
    This may not be the solution for everyone - howerver Microsoft has acknowledged a Session Cookie issue with Internet Explorer on Vista pre SP1 and XP all versions with IE 7. After patching the test browsers we had that exhibited the problem reported above, this fixed those issues.

    Here is the link to the Hot Fix for IE - its not the most intuitive thing to ask users to do but its an option:
    http://support.microsoft.com/kb/935778
    September 2, 2008
    I am seeing this same issue but only with IE browsers and only some of them, it does not appear to be version dependant.

    String index out of range: -1

    On Image uploads of any size from those specific IE users.

    Can anyone shed light on this?
    August 13, 2008
    That's the part I don't understand, because we didn't make any changes on that page and the code worked fine for them, and still works from other PCs.
    This is how thePath was being set:
    CFSET thePath= ReplaceNoCase(GetDirectoryFromPath(ExpandPath("*.*")),"admin\","")

    I changed this today to the actual path, so I'll see if that does it. Maybe the server just needs to be rebooted, I just hate bringing the other sites down as well. The server has been a little unstable lately and we do have to go in and restart the CF server sometimes, so it might just be the server acting up.
    August 13, 2008
    The error is:
    Error Occurred While Processing Request
    String index out of range: -1

    They are uploading big images though, like 4MB and 5MB files. I did ask him to resize some of them when he was trying to upload from the first computer but he still got that error message with a 400KB file! We checked his computer to make sure it wasn't a connection issue but he's got a 20MB download and 5MB upload connection, which we were very impressed with actually!!
    Participating Frequently
    August 13, 2008
    I don't see how it's possible for line 23 to throw that error. How are you setting thePath? Does that path exist? What is it set to? The documentation says the error thrown when the directory to write to doesn't exist isn't very helpful. Is this code being executed in a loop at all?
    Participating Frequently
    August 13, 2008
    what's the actual error (not just the line number and code from that line)? Is there disk space available on the drive where #thePath# is located? Are they uploading very large images and maybe going over the maximum upload size?