Adobe COLDFUSION 9 Manual page 900

Developing applications
Hide thumbs Also See for COLDFUSION 9:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Office file interoperability
<cfsharepoint
action="addlist"
login="#login#"
params="#{ listname ="getpics",
description="This a picture library list",
templateId= "109 " }#"/>
<! --- Creates a folder within the picture library list>
< cfsharepoint
action
="create new folder"
login= "#login#"
name="collection1"
params="#{strListName="getpics",
strParentFolder=""}#"/>
<!--- Uploads pictures to the folder that you created --->
<cfscript>
myimage = filereadbinary(expandpath("Bird.jpg"));
//convert the image into byte array to pass as input for "upload" action.
</cfscript>
<cfsharepoint
action="upload" login="#login#"
params="#{strListName="testpics",
strfolder="Collection1",
bytes="#myimage#",
filename="bird.jpg",
fOverwriteifexist=true}#"/>
<!--- Rotates the picture downloaded from the SharePoint server.--->
<cfsharepoint
name ="result1"
action="download"
login="#login#"
params="#{strListName="getpics",
strfolder="New Folder",
itemFileNames=["bird.jpg"],type=1,
fFetchoriginalIfNotAvailable=true}#"/>
<cfimage
action="rotate"
source="#result1.file#"
isbase64="yes"
angle="45"
name="temp"
destination="bird.jpg"
overwrite="yes"/>
<cfscript>
baseimage = filereadbinary(expandpath("bird.jpg"));
//convert the image into byte array to pass as input for "upload" action.
</cfscript>
<!--- Uploads the rotated image back to the SharePoint server --->
<cfsharepoint
action="upload"
login="#login#"
params="#{strListName="getpics",strfolder="Collection1",
bytes="#baseimage#",filename="bird.jpg",fOverwriteifexist=true}#"/>
To check and ensure that all the updates are made, you can retrieve the list items using code like the following:
Last updated 8/5/2010
895

Advertisement

Table of Contents
loading

Table of Contents