FileLink is deprecated (from R107), you should use File or Link instead.


The expected options differ when you are creating a file from when you're creating a link, therefore they're specified for both situations.

Message

Name
Description
Type
M/O

Description

Description shown for the link

Text

O

HideLink

Hide the link

Boolean, true/false

O

Link

Link url. Should be less than or equal to 2000 characters.
Text
M


Create Extension Instance content
<FileLinkContent>
<Description>This is a link to Google</Description>
<HideLink>true</HideLink>
<Link>http://www.google.com</Link>
</FileLinkContent>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:tem="http://tempuri.org/"
xmlns:its="http://schemas.datacontract.org/2004/07/Itslearning.Integration.ContentImport.Services.Entities">
<soapenv:Header/>
<soapenv:Body>
<tem:AddMessage>
<!--Optional:-->
<tem:dataMessage>
<!--Optional:-->
<its:Data><![CDATA[<?xml version="1.0" encoding="utf-8"?><Message xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:message-schema">
<CreateExtensionInstance>
<Location>Course</Location>
<ExtensionId>5000</ExtensionId>
<CourseId>1</CourseId>
<UserId>9</UserId>
<Title>This is a link to Google</Title>
<Content>
<FileLinkContent>
<Active>true</Active>
<Description>This is a link to Google</Description>
<HideLink>true</HideLink>
<Link>http://www.google.com</Link>
<OpenIn>ExistingWindow</OpenIn>
</FileLinkContent>
</Content>
</CreateExtensionInstance>
</Message>
]]></its:Data>
<!--Optional:-->
<its:Type>37</its:Type>
</tem:dataMessage>
</tem:AddMessage>
</soapenv:Body>
</soapenv:Envelope>


Message

Name
Description
Type
M/O

Description

Description shown for the file

Text

O

FileContentType

Mime type of file, will try to determine from fileName if not provided

Text

O

FileLocation
Location of the file (return value from the FileStreamService
Text
M
FileName
Name of the file
Text
M


Create Extension Instance content
<FileLinkContent>
<Description>This is a file</Description>
<FileContentType>image/jpeg</FileContentType>
<FileLocation>0f6ac961-a93f-4cea-b4ff-c93a92cb2ddd</FileLocation>
<FileName>Jellyfish.jpg</FileName>
</FileLinkContent>


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:tem="http://tempuri.org/"
xmlns:its="http://schemas.datacontract.org/2004/07/Itslearning.Integration.ContentImport.Services.Entities">
<soapenv:Header/>
<soapenv:Body>
<tem:AddMessage>
<!--Optional:-->
<tem:dataMessage>
<!--Optional:-->
<its:Data><![CDATA[<?xml version="1.0" encoding="utf-8"?><Message xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:message-schema">
<CreateExtensionInstance>
<Location>Course</Location>
<ExtensionId>5000</ExtensionId>
<CourseId>9</CourseId>
<UserId>1</UserId>
<Title>This is a file</Title>
<Content>
<FileLinkContent>
<Description>This is a file</Description>
<FileContentType>image/jpeg</FileContentType>
<FileLocation>0f6ac961-a93f-4cea-b4ff-c93a92cb2ddd</FileLocation>
<FileName>Jellyfish.jpg</FileName>
<OpenIn>ExistingWindow</OpenIn>
</FileLinkContent>
</Content>
</CreateExtensionInstance>
</Message>
]]></its:Data>
<!--Optional:-->
<its:Type>37</its:Type>
</tem:dataMessage>
</tem:AddMessage>
</soapenv:Body>
</soapenv:Envelope>


  • Invalid content: both file and url are supplied
  • Invalid content: neither file or url are supplied
  • Invalid content: both file id and file name need to be specified for file
  • Invalid uri scheme. Acceptable values are 'http' and 'https'.
  • Provided URL {Link} is not valid
  • Invalid content: the length of the file name is too long (the maximum length is 155 characters).
  • Invalid content: the length of the url is too long (the maximum length is 2000 characters).
  • File upload has failed: FileId cannot be reused.
  • File upload has failed: {Error}
  • File upload error: unknown error occured