Customer Portal

Get Involved. Join the Conversation.

Topic

    wang jin
    upload a picture to CP and get error access restricted...
    Topic posted September 20, 2019 by wang jinRed Ribbon: 250+ Points, last edited September 20, 2019 
    14 Views, 1 Comment
    Title:
    upload a picture to CP and get error access restricted folders
    Summary:
    upload a picture to CP and get error access restricted folders
    Content:

    Hi   all,

    am try to upload a picture to customer portal   using the connect PHP refer my below code but i get error, can any one please assist me to get the right solution ?

    Step 1. I created Test.php in /dav/cp/customer/development/controllers,please check attachment;
    Step 2. I created TestModel.php in /dav/cp/customer/development/models/custom,please check attachment;
    Step 3. I used admin account of RightNow and used initConnectAPI("QYP", "Password1") to initial API ;
    Step 4. When I used test.html(check attachment) to post a picture to the controller,and got the error message as attachemnt named error.png。

    Document:
    Test.php (1KB)
    Document:
    Document:
    error.png (66KB)

    Comment

     

    • Lakshay Bhalla

      Hi Wang,

      Have you tried changing the path from this:  "$path='/dav/cp/customer/assets/upload/'.$new_name;" to  "$path='/euf/assets/upload/'.$new_name;"

      Thanks