SharePoint - Download Attachment
Declaration
<AMSHAREPOINT ACTIVITY="download_attachment" TITLE="text" ID="text" ATTACHMENT="text" DESTINATION="text" OVERWRITE="yes/no" PROVIDER="text (options)" />
Description: Downloads an attachment from a list item in a Microsoft Windows SharePoint Service.
Practical Usage
Used to download an existing attachment from the specified list item.
Connection Parameters
Property |
Type |
Required |
Default |
Markup |
Description |
---|---|---|---|---|---|
Connection |
--- |
--- |
--- |
--- |
Indicates where this activity's SharePoint credentials should originate from. This is a design-time parameter used only during task construction, thus, contains no properties or markups. The available options are:
|
Session |
Text |
Yes if Connection set to Session |
SharePoint Session1 |
SESSION="mySession1" |
The name of the session to associate this activity with. This parameter is active only if the Connection parameter is set to Session. The default value is SharePointSession1. NOTE: Use the End Session activity to end an active SharePoint session. |
Version |
Text (options) |
Yes if Connection set to Host |
SharePoint 2010 |
|
The SharePoint version to associate with this session. The available options are:
NOTE: Some SharePoint activities are only supported in SharePoint 2010 or newer. |
Site |
Text |
Yes |
(Empty) |
SITE="http://myServer/tech" |
An existing SharePoint site to associate with this session. SharePoint sites are, functionally, ASP.NET 2.0 web applications that are served using IIS and a SQL Server database as a data storage back end. Active only if the Version parameter is set to SharePoint Online or SharePoint 2010 and newer. |
Authentication type |
Text (options) |
No |
Basic |
|
The method of authentication to use. Certain parameters become active depending on which authentication method is selected. Authentication types vary depending on the SharePoint version. Below lists available authentication methods and their compatibility.
|
Username |
Text |
Yes |
(Empty) |
USERNAME="theUserName" |
A valid SharePoint username. This parameter may or may not be active depending on which option is selected under the Authentication type parameter. |
Password |
Text |
Yes |
(Empty) |
PASSWORD="encryptedText" |
A valid SharePoint password. This parameter may or may not be active depending on which option is selected under the Authentication type parameter. |
Domain |
Text |
Yes |
(Empty) |
DOMAIN="myServer" |
The domain that the username (specified in the Username parameter) belongs to. This parameter may or may not be active depending on which option is selected under the Authentication type parameter. |
Certificate |
Text |
No |
(Empty) |
CERTIFICATE="C:\Temp\file.cer" |
The (DER encoded) certificate to use for SharePoint authentication. This parameter may or may not be active depending on which option is selected under the Authentication type parameter. |
Ignore invalid certificate |
Yes/No |
No |
No |
IGNOREINVALIDCERTIFICATE="yes" |
If set to YES, specifies that invalid server certificates that are detected will be automatically ignored. Set to NO by default. |
Timeout (seconds) |
Number |
No |
600 |
TIMEOUT="500" |
The total number of seconds allowed to connect to the SharePoint server, otherwise a time out error is generated. The default value is 600 seconds. |
Proxy type |
Text (options) |
No |
Default |
|
The proxy type to use. Required for SharePoint connections that pass through a proxy server. The available options are:
|
Use authentication |
--- |
--- |
--- |
--- |
If enabled, specifies that proxy authentication is required, enabling authentication-based parameters (disabled by default). This is a design-time parameter, therefore, contains no properties or markups. It is active only if the Proxy type parameter is set to HTTP. |
Proxy server |
Text |
No |
(Empty) |
PROXYSERVER="proxy.host.com" |
The host name (server.domain.com) or IP address (xxx.xxx.xxx.xxx) of the proxy server. This parameter is available only if the Proxy type parameter is set to HTTP. |
Proxy username |
Text |
No |
(Empty) |
PROXYUSERNAME=username |
The proxy username to authenticate with. This parameter is available only if the Use Authentication parameter is enabled. |
Proxy password |
Text |
No |
(Empty) |
PROXYPASSWORD="encrypted" |
The proxy password to authenticate with. This parameter is available only if the Use Authentication parameter is enabled. |
Proxy port |
Number |
No |
8080 |
PROXYPORT="8080" |
The port that should be used to connect to the proxy server. The default port is 8080. This parameter is available only if the Proxy type parameter is set to HTTP. |
Attachment Parameters
Property |
Type |
Required |
Default |
Markup |
Description |
---|---|---|---|---|---|
List Title |
Text |
Yes |
(Empty) |
TITLE="list_title" |
The title of the list that contains the attachment to download. Click the folder icon to use the SharePoint Browser, a user-friendly interface that enables connection to a SharePoint site to view or select specific contents such as files, folders and attachments. |
List Item ID |
Text |
Yes |
(Empty) |
ID="the_item_ID" |
The list item identifier of the list that contains the attachment to download. |
Attachment Name |
Text |
Yes |
(Empty) |
ATTACHMENT="myFile" |
The name of the attachment to download. |
Destination |
Text |
Yes |
(Empty) |
DESTINATION= "C:\Temp\myFile.txt" |
The target location in which to download the attachment to. |
Overwrite |
Yes/No |
No |
No |
OVERWRITE="yes |
If set to YES, files contained in the destination that have an identical name as the attachment to download will be automatically overwritten. If set to NO, if a file with the same name is found in the destination, this step will fail and generate an error. This parameter is set to NO by default. |
Example
The sample AML code below can be copied and pasted directly into the Steps panel of the Task Builder.
Description: Download SharePoint attachment "myFile.txt" into "C:\Temp\myFile.txt" from item id "item_ID" in list "myList". Session is "SharePointSession1".
<AMSHAREPOINT ACTIVITY="download_attachment" TITLE="myList" ID="item_ID" ATTACHMENT="myFile.txt" DESTINATION="C:\Temp\myFile.txt" OVERWRITE="yes" PROVIDER="session_based" />