diff options
author | Sean Dague | 2008-08-27 18:59:42 +0000 |
---|---|---|
committer | Sean Dague | 2008-08-27 18:59:42 +0000 |
commit | fc81ddc1d11901f14d0c20ec87944c5278e568ea (patch) | |
tree | 7a1e90e93e3cdb6da683fa93c3e8d4f3908b02eb /OpenSim/ApplicationPlugins | |
parent | remove legacy pre-Migration database upgrade routines (diff) | |
download | opensim-SC-fc81ddc1d11901f14d0c20ec87944c5278e568ea.zip opensim-SC-fc81ddc1d11901f14d0c20ec87944c5278e568ea.tar.gz opensim-SC-fc81ddc1d11901f14d0c20ec87944c5278e568ea.tar.bz2 opensim-SC-fc81ddc1d11901f14d0c20ec87944c5278e568ea.tar.xz |
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.
Diffstat (limited to 'OpenSim/ApplicationPlugins')
-rw-r--r-- | OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs index 9e4fae6..6b802d3 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs | |||
@@ -265,7 +265,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory | |||
265 | asset.Type = SByte.Parse(xml.GetAttribute("type")); | 265 | asset.Type = SByte.Parse(xml.GetAttribute("type")); |
266 | asset.Local = Int32.Parse(xml.GetAttribute("local")) != 0; | 266 | asset.Local = Int32.Parse(xml.GetAttribute("local")) != 0; |
267 | asset.Temporary = Int32.Parse(xml.GetAttribute("temporary")) != 0; | 267 | asset.Temporary = Int32.Parse(xml.GetAttribute("temporary")) != 0; |
268 | asset.Data = (new System.Text.ASCIIEncoding()).GetBytes(Rest.Base64ToString(xml.ReadElementContentAsString("Asset", ""))); | 268 | asset.Data = Convert.FromBase64String(xml.ReadElementContentAsString("Asset", "")); |
269 | 269 | ||
270 | Rest.AssetServices.AddAsset(asset); | 270 | Rest.AssetServices.AddAsset(asset); |
271 | } | 271 | } |