21 lines
457 B
C++
21 lines
457 B
C++
#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
|