provide blob uuid from upload data

This commit is contained in:
deepak1556 2016-08-23 06:08:10 +05:30
parent a37544cef4
commit 2b0f632d51

View file

@ -20,6 +20,7 @@
#include "net/cert/x509_certificate.h"
#include "net/http/http_response_headers.h"
#include "net/url_request/url_request.h"
#include "storage/browser/blob/upload_blob_element_reader.h"
namespace mate {
@ -95,6 +96,10 @@ void GetUploadData(base::ListValue* upload_data_list,
reader->AsFileReader();
auto file_path = file_reader->path().AsUTF8Unsafe();
upload_data_dict->SetStringWithoutPathExpansion("file", file_path);
} else {
const storage::UploadBlobElementReader* blob_reader =
static_cast<storage::UploadBlobElementReader*>(reader.get());
upload_data_dict->SetString("blobUUID", blob_reader->uuid());
}
upload_data_list->Append(std::move(upload_data_dict));
}