URGENT file/image upload problem

Last post 09-24-2005, 6:27 AM by silicoNimagE. 5 replies.
Sort Posts: Previous Next
  •  09-23-2005, 6:27 AM 10943

    URGENT file/image upload problem

    Here is my path specification:
     
    ------------------------------
    'paths to files
    CheckOrCreateFolder Trim(CStr(OfficeName)), Trim(CStr(LanguageID)), "images"
    editor.ImageGalleryPath = "../website/" & Trim(CStr(OfficeName)) & "/" & Trim(CStr(LanguageID)) & "/images"
    ------------------------------

    The first try to upload e.g. an image gives me the following error:

    ------------------------------
    Microsoft VBScript runtime (0x800A0005)
    Invalid procedure call or argument
    /Adagio/conten/include_upload.asp, line 122
     
    POST Data:
    error '80020009'
     
    Exception occurred.
    ------------------------------

    The second time (and times after that) it works fine, until I refresh the page, then I get the error again...

    PS: it is NOT possible to use a sub-path of the CuteEditor location.

    It is very important that I get a solution for this.
    We bought the Cute Editor (ASP) for a very important client.

    Regards.
    K.
     
  •  09-23-2005, 6:34 AM 10945 in reply to 10943

    Re: URGENT file/image upload problem

    And please don't start with set the "IUSR_<...>" permissions, they are all set correct.

    The fact that it does work the second time proves this.
    Maybe a bug ?

    Or do I need to set some other property for CuteEditor to find the path the first time ?
     
    K.
  •  09-23-2005, 6:38 AM 10946 in reply to 10945

    Re: URGENT file/image upload problem

    About that first upload try...
     
    When the 'Insert Image' popup appears, I CAN browse the exact folder to select a file.
     
    Very strange that it doesn't do the upload correcly then !?
  •  09-23-2005, 7:09 AM 10948 in reply to 10946

    Re: URGENT file/image upload problem

    Been debugging the uploading routine of CuteEditor a bit.
     
    The problem is situated in this routine:
    For nIndex = 1 to LenB(FileData) 
        oFile.Write Chr(AscB(MidB(FileData,nIndex,1)))    <-----
    Next
     
    When I retrieve the "Set oFile = oFS.CreateTextFile(sPath & FileName, True)" path from the code just above the previous code sample, then the path is 100% correct, e.g. c:\inetpub\wwwroot\adagio\website\Brussel\images\upImage.jpg.
     

    Hope you can help ASAP, deadline is within 2 hours !!!

    K.
     
  •  09-23-2005, 11:57 AM 10958 in reply to 10948

    Re: URGENT file/image upload problem

    Please don't modify the CE source code.
     
    Let try the steps below:

    Create a folder under ../website/, name it "MyTestFolder"
     
    editor.ImageGalleryPath = "../website/myTestFolder"
     
    If you don't have problem with it, can you print out the following string:

    "../website/" & Trim(CStr(OfficeName)) & "/" & Trim(CStr(LanguageID)) & "/images"

    ?
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  09-24-2005, 6:27 AM 10988 in reply to 10958

    Re: URGENT file/image upload problem

    First of all, I didn't change any of your code, I just added some response.write stuff to check if all paths to the image and document folders were created correctly by CuteEditor. I already removed my changes.

    For example:
     
    ../website/Brussels/4/images
    ../website/Brussels/41/images
    ../website/Cyprus/1/images
    ...

    I was already confident about the above paths, because they are used throughout the entire project.
    Sadly I can not inform you about more of the project code because of my client's security.
     
    I FOUND A SOLUTION.
    It's a codepage problem !
    All the ASP pages of the project use CodePage 65001 because it's a multilanguage UTF-8 project using an Oracle (with utf8 charset) database.
     
    I added <% @codepage=1252 %> on top of the filePost.asp page, and now it seems to work correctly !!! 
    I will leave this modification in the CuteEditor code, because it is very important that this funcionality works for my client.

    CRITICISM.
    I think you should have known about this for CuteEditor, it's a bit sad that I have to debug commercial code to get it to work.
    Then again, maybe CuteEditor has a property to set the codepage, but I certainly haven't found how...

    I also found the documentation that came with CuteEditor for ASP inadequate.
    Luckily I'm a programmer, so I was able to find all funcionality myself (and also in the forum here).

    Please accept my criticism as positive criticism.
    I can understand very well that you probably have your minds set on the future with CuteEditor.Net, and are probably focusing on that new system now...

    If it was up to me, I would have made the project in ASP.NET, but our client wouldn't hear of it :(
     
    K.
     
View as RSS news feed in XML