From: Richard Alimi <ralimi@us.ibm.com>

The following patch fixes the import of assets via the REST interface to
use the proper Base64->Bytes conversion. The previous conversion did not
work correctly for binary data, in particular for textures.
0.6.0-stable
Sean Dague 2008-08-27 18:59:42 +00:00
parent 5bf5e1c320
commit fc81ddc1d1
1 changed files with 1 additions and 1 deletions

View File

@ -265,7 +265,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
asset.Type = SByte.Parse(xml.GetAttribute("type"));
asset.Local = Int32.Parse(xml.GetAttribute("local")) != 0;
asset.Temporary = Int32.Parse(xml.GetAttribute("temporary")) != 0;
asset.Data = (new System.Text.ASCIIEncoding()).GetBytes(Rest.Base64ToString(xml.ReadElementContentAsString("Asset", "")));
asset.Data = Convert.FromBase64String(xml.ReadElementContentAsString("Asset", ""));
Rest.AssetServices.AddAsset(asset);
}