|
IronPython: File upload to Sharepoint |
|
|
|
|
Tuesday, 08 June 2010 |
|
So easy and works fine with proxy. def upload2sharepoint(host_target,source_file): # (.Net) upload to Sharepoint... # it's that easy! wc = System.Net.WebClient() wc.Credentials=System.Net.CredentialCache.DefaultCredentials bytes = System.IO.File.ReadAllBytes(source_file) wc.UploadData(host_target,'PUT',bytes) Download the full script , a work in progress, with logging, etc...
|