aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenGridServices.AssetServer/Main.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenGridServices.AssetServer/Main.cs')
-rw-r--r--OpenGridServices.AssetServer/Main.cs30
1 files changed, 29 insertions, 1 deletions
diff --git a/OpenGridServices.AssetServer/Main.cs b/OpenGridServices.AssetServer/Main.cs
index 887bf07..b57a5a5 100644
--- a/OpenGridServices.AssetServer/Main.cs
+++ b/OpenGridServices.AssetServer/Main.cs
@@ -100,7 +100,35 @@ namespace OpenGridServices.AssetServer
100 } 100 }
101 101
102 public string assetGetMethod(string request, string path, string param) { 102 public string assetGetMethod(string request, string path, string param) {
103 return ""; 103 byte[] assetdata=getAssetData(new LLUUID(param),false);
104 if(assetdata!=null) {
105 return System.Text.Encoding.ASCII.GetString(assetdata);
106 } else {
107 return "";
108 }
109
110 }
111
112 public byte[] getAssetData(LLUUID assetID, bool isTexture) {
113 byte[] idata = null;
114 bool found = false;
115 AssetStorage foundAsset = null;
116
117 IObjectSet result = db.Get(new AssetStorage(assetID));
118 if (result.Count > 0)
119 {
120 foundAsset = (AssetStorage)result.Next();
121 found = true;
122 }
123
124 if (found)
125 {
126 return foundAsset.Data;
127 }
128 else
129 {
130 return null;
131 }
104 } 132 }
105 133
106 public void setupDB() { 134 public void setupDB() {