Skip to content

Commit

Permalink
Merge branch 'stephenwelsh-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysgodfrey committed Jun 23, 2014
2 parents a9f55fa + 416c137 commit 12b50d0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
11 changes: 9 additions & 2 deletions CopyToAzureBlobStorageTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ public string ContentType
set;
}

public string DestinationFolder
{
get;
set;
}

public string ContentEncoding
{
get;
Expand Down Expand Up @@ -80,7 +86,8 @@ public bool Execute()
{
FileInfo file = new FileInfo(fileItem.ItemSpec);

CloudBlob blob = container.GetBlobReference(file.Name);
string folder = string.IsNullOrEmpty(DestinationFolder) ? "" : DestinationFolder + @"\";
CloudBlob blob = container.GetBlobReference(folder + file.Name);

try
{
Expand Down Expand Up @@ -130,4 +137,4 @@ public ITaskHost HostObject
}
}
}
}
}
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,16 @@ selected above to a container named *scripts*:
<td>ContentType</td>
<td><em>Optional</em> The content type for Azure to serve the files as</td>
</tr>
<tr>
<td>DestinationFolder</td>
<td><em>Optional</em> The destination folder to upload the file(s)</td>
</tr>
</table>

## License ##

This library is released under the *FreeBSD License*, see **LICENSE.txt** for more information.

Blog: http://www.rhysgodfrey.co.uk

Twitter: @rhysgodfrey

0 comments on commit 12b50d0

Please sign in to comment.