Save uploaded files in multipart request to disk
Instead of keeping them in memory. Pass the file descriptor/file stream
to the handler process when asking for the uploaded file data.
BUG: 24166746
Change-Id: Ife4f5b4fa422d99272b15f6f02e4b3b515e4e3b4
diff --git a/libwebserv/protocol_handler.h b/libwebserv/protocol_handler.h
index 648f0ff..91276d9 100644
--- a/libwebserv/protocol_handler.h
+++ b/libwebserv/protocol_handler.h
@@ -26,6 +26,7 @@
#include <base/memory/weak_ptr.h>
#include <chromeos/errors/error.h>
#include <chromeos/secure_blob.h>
+#include <chromeos/streams/stream.h>
#include <dbus/object_path.h>
#include <libwebserv/export.h>
@@ -174,7 +175,7 @@
LIBWEBSERV_PRIVATE void GetFileData(
const std::string& request_id,
int file_id,
- const base::Callback<void(const std::vector<uint8_t>&)>& success_callback,
+ const base::Callback<void(chromeos::StreamPtr)>& success_callback,
const base::Callback<void(chromeos::Error*)>& error_callback);
// A helper method to obtain a corresponding protocol handler D-Bus proxy for