// CapsHttpClient client = e.getClient();
OSD result = e.getResult();
Exception error = e.getError();
if (error == null && (result instanceof OSDMap))
{
UploadBakedTextureMessage message = new UploadBakedTextureMessage();
message.Deserialize((OSDMap)result);
if (message.Request.State.equals("upload"))
{
URI uploadUrl = ((UploaderRequestUpload)message.Request).Url;
if (uploadUrl != null)
{
// POST the asset data
CapsHttpClient upload = new CapsHttpClient(uploadUrl);
upload.setRequestCompleteDelegate(new MethodDelegate<Void, CapsHttpRequestCompletedArg>()
{
public Void execute(CapsHttpRequestCompletedArg e2) {
OSD result2 = e2.getResult();
Exception error2 = e2.getError();
if (error2 == null && result2 instanceof OSDMap)
{
UploadBakedTextureMessage message2 = new UploadBakedTextureMessage();
message2.Deserialize((OSDMap)result2);
if (message2.Request.State.equals("complete"))
{
callback.execute(new BakedTextureUploadedCallbackArgs(((UploaderRequestComplete)message2.Request).AssetID));
}