Exemplo n.º 1
0
            /// <summary>
            ///
            /// </summary>
            /// <param name="data"></param>
            /// <param name="path"></param>
            /// <param name="param"></param>
            /// <returns></returns>
            public string uploaderCaps(byte[] data, string path, string param)
            {
                UUID   inv = inventoryItemID;
                string res = String.Empty;
                OSDMap map = new OSDMap();

                map["new_asset"]          = newAssetID.ToString();
                map["new_inventory_item"] = inv;
                map["state"] = "complete";
                res          = OSDParser.SerializeLLSDXmlString(map);

                clientCaps.RemoveStreamHandler(uploadMethod, "POST", uploaderPath);

                m_invCaps.UploadCompleteHandler(m_assetName, m_assetDes, newAssetID, inv, parentFolder, data, m_invType, m_assetType);

                return(res);
            }
Exemplo n.º 2
0
            ///<summary>
            ///</summary>
            ///<param name = "data"></param>
            ///<param name = "path"></param>
            ///<param name = "param"></param>
            ///<returns></returns>
            public byte[] uploaderCaps(string path, Stream request,
                                       OSHttpRequest httpRequest, OSHttpResponse httpResponse)
            {
                UUID inv = inventoryItemID;

                byte[] data = HttpServerHandlerHelpers.ReadFully(request);
                clientCaps.RemoveStreamHandler(uploadMethod, "POST", uploaderPath);

                newAssetID = m_invCaps.UploadCompleteHandler(m_assetName, m_assetDes, newAssetID, inv, parentFolder,
                                                             data, m_invType, m_assetType, m_everyone_mask, m_group_mask,
                                                             m_next_owner_mask);

                OSDMap map = new OSDMap();

                map["new_asset"]          = newAssetID.ToString();
                map["new_inventory_item"] = inv;
                map["state"] = "complete";

                return(OSDParser.SerializeLLSDXmlBytes(map));
            }