ClientMetadata cm = new ClientMetadata(mimeType);
boolean isMetadata = false;
if(logMINOR) Logger.minor(this, "data = "+tempData+", uploadFrom = "+uploadFrom);
if(uploadFrom == UploadFrom.REDIRECT) {
this.targetURI = message.redirectTarget;
Metadata m = new Metadata(DocumentType.SIMPLE_REDIRECT, null, null, targetURI, cm);
try {
tempData = m.toBucket(server.core.clientContext.getBucketFactory(isPersistentForever()));
} catch (MetadataUnresolvedException e) {
// Impossible
Logger.error(this, "Impossible: "+e, e);
this.data = null;
clientMetadata = cm;