Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
RetrieveFile API Method
GRD
We are using the RetrieveFile API method (MBPNetModel namespace) to fetch an image from MediaBin into a byte array. This invoked in an executable (.exe) that runs from a tag inside a TeamSite presentation template (the .exe generates a PDF file along with some other stuff). We are getting an error on the method if the logged-in TeamSite user is not a Power User or Administrator on the local TeamSite machine:
MBException: Access to the path "C:\WINDOWS\MBDir_1117961619" is denied.
It appears the command is running under the same permission as the logged-in user, which does not have read/write access to the c:\windows folder -- it seems the MediaBin library is creating a folder under c:\windows to pull down the file, then read it back into a byte array.
Does anyone know how to instruct the MediaBin API to pull the file down to an alternate path where I can grant read/write privileges to everyone? Or, do I need to use the RetrieveFile overload to fetch the file from MediaBin to a specific folder, then read it back manually into a byte array?
Any help would be appreciated.
Thanks,
-Greg
Find more posts tagged with
Comments
Konidala
If you are using WebServices it downloads the file to the windows temp directory. So check your system environment variables to set the windows temp directory to the folder you want. By default it's C:\WINDOWS\Temp.
GRD
Thanks for the response, Konidala. Yes, the Windows TEMP folder environment variable is set to C:\WINDOWS\TEMP, however, the MediaBin API is creating the temporary folders under C:\WINDOWS.
-Greg
cliff1
I don't know about the internals of the MB C++ api, so my reply does not address your specific question.
I want to point out that if you are using TeamSite 6.5 SP2, the ECM Connector 2.0 is included with the last couple of patches. The connector allows you to accomplish the import from a PT without writting a native program. The connector includes a PT tag that calls into a ContentCenter servlet to make the downlaod happen. The servlet code is using the MB webservices API to fetch the file (rendition) and CSSDK to save the file in TeamSite -- no temp files are created on the TeamSite system. The PT tag allows you to invoke parameterized MB retrieval tasks and store the file anywhere in the workarea, which hopefully gives you the flexibility that you need.
For more information, download the ECM Solution Implementation Guide 2.0 (Support Home > Interwoven Products > ECM Solution (under Content Management colum) > ECM Solution 2.0.
Also, on a system running a recent patch (after March 06) of 6.5 SP2, go to iw-home and run:
perldoc iw-perl/vendor/lib/TeamSite/PT/iwov_import_mediabin.pm
perldoc iw-perl/vendor/lib/TeamSite/PT/iwov_mediabin_param.pm
Migrateduser
Which version of MediaBin are you using?
You should be able to specify in the web.config file of the mediabinwebservice site where the temporary files are to be stored...