Blob b = (Blob) obj;
String fileName = index == null ? propertyName : propertyName + "[" + index + "]";
FileDownloadPath downloadPath = AutoBeanUtil.newFileDownloadPath(
FileDownloadPath.Type.DATASTORE_BLOB, keyString, propertyName, index, fileName, b.getBytes().length);
String pathStr = AutoBeanUtil.encode(FileDownloadPath.class, downloadPath);
result = new BlobPropertyInfo(b.getBytes().length, pathStr);
} else if (obj instanceof BlobStringWrapper) { // user has edited a blob, in string form, it's not in memcache, nor datastore
result = new BlobPropertyInfo(((BlobStringWrapper) obj).getRawString().getBytes());
} else if (obj instanceof BlobFileRefWrapper) { // user has uploaded the blob, but still stay in memcache
FileDownloadPath path = ((BlobFileRefWrapper) obj).getRef();
String pathStr = AutoBeanUtil.encode(FileDownloadPath.class, path);
result = new BlobPropertyInfo(path.getSize(), pathStr);
} else if (obj instanceof BlobKey) {
String blobKeyString = ((BlobKey) obj).getKeyString();
result = new BlobKeyPropertyInfo(blobKeyString);
} else if (obj instanceof Key) {
result = convert((Key)obj);