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
parent
5bf5e1c320
commit
fc81ddc1d1
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue