mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
provide blob uuid from upload data
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user