Hello,
Using the following to upload a file to a SP picture library. It works in every browser except Safari. Is there something I'm missing here?
protected void Button1_Click(object sender, System.EventArgs e)
{
if (File1.PostedFile != null)
{
//SPWeb site = SPContext.Current.Web;
SPWeb web = SPContext.Current.Site.OpenWeb();
web.AllowUnsafeUpdates = true;
Stream fStream = File1.PostedFile.InputStream;
byte[] contents = new byte[fStream.Length];
fStream.Read(contents, 0, (int)fStream.Length);
fStream.Close();
string Filename = File1.FileName;
string destUrl = SPContext.Current.Site.Url + "/ProfileImages/" + Filename;
web.Files.Add(destUrl, contents);
}
}
any help is appreciated.sayitfast