To download a file in a C# scripted function, you must first go to the .NET Global section (after you choose to create a global script as found HERE), and in the External Assemblies box, enter the following: System.dll,System.Net.dll
object ScriptedField()
{
var url = "https://www.wikipedia.org/portal/wikipedia.org/assets/img/Wikipedia-logo-v2.png";
return new System.Net.WebClient().DownloadData(url);
}
object ScriptedField()
{
var url = "https://www.wikipedia.org/portal/wikipedia.org/assets/img/Wikipedia-logo-v2.png";
return Convert.ToBase64String(new System.Net.WebClient().DownloadData(url));
}