Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
return iCal
Uldis_Silovs
Hi all,I' m looking for the way how to generate .ics format file within Livelink to be able to download and import it in Outlook.ics basically is just a text file, which content could be generated somehow, but how to make Livelink change headersheader("Content-Type: text/Calendar");header("Content-Disposition: inline; filename=filename.ics");The idea is to have event title and date in some Livelink table and then list all and provide a link for ics file.What are my options?Thanks
Find more posts tagged with
Comments
John Underhill
This link is often quoted here as an example of have a Request Handler return any old text format you want:
http://ednortonengineeringsociety.blogspot.com/2009/08/creating-restful-web-services-with.htmlIt
may have what you want. In the example they return XML but as it says in the article it could be anything ... and after all iCal is this type of file. Up to step 4 creates the handler. Override the Execute method to do any processing to build any data you need to use in your weblingo file. The only potential problem I cane see is having to use the .html extension, but does that matter if the MIME type is set?
Uldis_Silovs
This is good.I will try to look for something already done, but if no success will need to create my own code
Uldis_Silovs
There is oject in webcommittee module called exporttoical which actualy does what i need.Snippet from code:header = Str.Format( '%1Content-Disposition: attachment; filename="%2"%3%3', \ header, \ filename + '.vcs', \ crlf )Just need to check how can I take use of it
John W. Simon, Jr.
code I have used to respond to a user's request with a file...I hope it helps!// set up versionString version = '1.0'// write the headersString lineOutlineOut = "HTTP/1.1 200 OK" + Web.CRLFlineOut += Str.Format( "Date: %1", Date.DateToString( Date.Now(), "%a, %d-%b-%Y %H:%M:%S GMT" ) ) + Web.CRLFlineOut += "Content-Type: text/xml " + Web.CRLFlineOut += "Content-Disposition: inline; filename=whatever.extension" + Web.CRLF + Web.CRLFWeb.Write( request.ctxOut, lineOut )// write the filelineOut = Str.Format( '<?xml version="1.0" encoding="UTF-8" ?>%1', Web.CRLF )Web.Write( request.ctxOut, lineOut )lineOut = Str.Format( '%2', version, Web.CRLF )Web.Write( request.ctxOut, lineOut )lineOut = Str.Format( 'ID="%1" />%2', request.objid, Web.CRLF )Web.Write( request.ctxOut, lineOut )lineOut = Str.Format( '%1', Web.CRLF )Web.Write( request.ctxOut, lineOut )Socket.Close( request.ctxOut )
Greg_Griffiths
I know that the OnTime module has this option, although the module is discontinued now, the code should still be available.
Pierre_Nocera
I guess you may have to change the fHTMLMimetype feature of your requesthandler to "text/Calendar" and set fExtraHeader to "Content-Disposition: inline; filename=filename.ics"Pierre