}
+void RGWFormPost::init(RGWRados* const store,
+ req_state* const s,
+ RGWHandler* const dialect_handler)
+{
+ prefix = std::move(s->object.name);
+ s->object = rgw_obj_key();
+
+ return RGWPostObj_ObjStore::init(store, s, dialect_handler);
+}
+
int RGWFormPost::get_params()
{
/* The parentt class extracts boundary info from the Content-Type. */
const auto iter = field.params.find("filename");
if (std::end(field.params) != iter) {
- return s->object.name + iter->second;
+ return prefix + iter->second;
}
} catch (std::out_of_range&) {
/* NOP */;
}
- return s->object.name;
+ return prefix;
}
bool RGWFormPost::is_next_file_to_upload()
bool is_next_file_to_upload() override;
boost::optional<post_form_part> current_data_part;
-
+ std::string prefix;
bool stream_done = false;
public:
RGWFormPost() = default;
~RGWFormPost() = default;
+ void init(RGWRados* store,
+ req_state* s,
+ RGWHandler* dialect_handler) override;
+
int get_params() override;
int get_data(ceph::bufferlist& bl) override;
void send_response() override;