Permission Denied error on uploading an image through a CGI file

Hi,

Requirement: Have a CGI callout that the users can use to upload images to TeamSite from their local machines and populate the DCT field simultaneously.

Implementation: We have registered a javascript function on "OnCallout" event which calls the CGI. This CGI offers the user the GUI to select an image from his local machine and hit "Upload" button. This triggers another CGI script.

Issue: Hitting the "Upload" button results in a permission denied error. We cannot convert the final CGI (that uploads it to TeamSite and populates the DCT field) into a perl file and use iw_cgi_wrapper.cgi (to remove the permission issue) since enctype="multiple/form-data" will not be supported.

Can someone please help us find a resolution

Thanks
Dhruv

Comments

  • Hi,

    Requirement: Have a CGI callout that the users can use to upload images to TeamSite from their local machines and populate the DCT field simultaneously.

    Implementation: We have registered a javascript function on "OnCallout" event which calls the CGI. This CGI offers the user the GUI to select an image from his local machine and hit "Upload" button. This triggers another CGI script.

    Issue: Hitting the "Upload" button results in a permission denied error. We cannot convert the final CGI (that uploads it to TeamSite and populates the DCT field) into a perl file and use iw_cgi_wrapper.cgi (to remove the permission issue) since enctype="multiple/form-data" will not be supported.

    Can someone please help us find a resolution

    Thanks
    Dhruv
    You didn't mention what version of TeamSite you are on - but, assuming you're in 6.x, I believe you might be able to use the import CCI URL - I'm not sure how you get the resulting path of the imported file, perhaps it is passed through to the done_page URI - in which case you could set the done_page to your own CGI that simply retrieved the information and set the DCT field.

    I haven't utilized this myself - but it seems like the right way to go...
  • Hitting the "Upload" button results in a permission denied error
    That's too vague. You'd have to follow an event deeper. Who throws "Permission denied" and when?

    If it is your JS when you populate DCR Field, then perhaps you try to modify opener's (DCR) field from the child Page with different
    domain location. That's a violation of browser cross-domain security model, can not be done.

    If it is your CGI script writing a File, there are (or rather may be) ways to write it without enctype="multipart/form-data" (or perhaps you are
    talking BEA and just MUST use it?)
  • Hi,

    Can someone please post the syntax of the Import CCI URL and some documentation around it

    Thanks
    Dhruv
  • Hi,

    Can someone please post the syntax of the Import CCI URL and some documentation around it

    Thanks
    Dhruv
    Interwoven® User Interface CustomizationGuide Release 1.5.0
    Chapter 9 Using URL Commands, File URL Commands, Command "Import"
  • Hi,

    I am using import CCI URL. I need to fill my DCT field with the path to the imported image. Is there a way to get that?

    Thanks
    Dhruv
  • Hi,

    I am using import CCI URL. I need to fill my DCT field with the path to the imported image. Is there a way to get that?

    Thanks
    Dhruv
    There is no supported API to get *imported assets* information. You will have to code that.

    For example, you may upload Files to certain temporary location and use "done_page" CGI to
    populate DCR and move assets to *real* destination. You will have to make sure that the
    interim location is unique per user/session, etc.
TeamSite Developer Resources

  • Docker Automation

  • LiveSite Content Services (LSCS) REST API

  • Single Page Application (SPA) Modules

  • TeamSite Add-ons

If you are interested in gaining full access to the content, you can register for a My Support account here.
image
OpenText CE Products
TeamSite
APIs