This commit is contained in:
Your Name
2025-05-25 11:30:18 +12:00
parent 90b4946ce8
commit 52dcaada2d
6 changed files with 267 additions and 207 deletions

21
src/put_handler.hpp Normal file
View File

@@ -0,0 +1,21 @@
#pragma once
#include <string>
#include <filesystem>
#include "server.hpp"
#include "httplib.hpp"
#include "json.hpp"
namespace simple_object_storage {
class PutHandler {
public:
PutHandler(Server& server);
void handle_put_object(const httplib::Request& req, httplib::Response& res);
private:
Server& server_;
void add_file_metadata(const std::string& file_path, nlohmann::json& metadata) const;
};
} // namespace simple_object_storage