31 using System.Reflection;
35 using System.Text.RegularExpressions;
37 using System.Xml.Serialization;
38 using OpenSim.Server.Base;
39 using OpenSim.Services.Interfaces;
40 using OpenSim.Framework;
41 using OpenSim.Framework.ServiceAuth;
42 using OpenSim.Framework.Servers.HttpServer;
44 namespace OpenSim.Server.Handlers.
Asset
53 base(
"POST",
"/assets")
55 m_AssetService = service;
59 base(
"POST",
"/assets", auth)
61 m_AssetService = service;
68 XmlSerializer xs =
new XmlSerializer(typeof(
AssetBase));
72 asset = (
AssetBase)xs.Deserialize(request);
76 httpResponse.StatusCode = (int)HttpStatusCode.BadRequest;
80 string[] p = SplitParams(path);
84 bool result = m_AssetService.UpdateContent(id, asset.Data);
86 xs =
new XmlSerializer(typeof(
bool));
87 return ServerUtils.SerializeResult(xs, result);
91 string id = m_AssetService.Store(asset);
93 xs =
new XmlSerializer(typeof(
string));
94 return ServerUtils.SerializeResult(xs, id);
Base streamed request handler.
override byte[] ProcessRequest(string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
Asset class. All Assets are reference by this class or a class derived from this class ...
AssetServerPostHandler(IAssetService service, IServiceAuth auth)
AssetServerPostHandler(IAssetService service)