return RGWPostObj_ObjStore::init(store, s, dialect_handler);
}
+std::size_t RGWFormPost::get_max_file_size() /*const*/
+{
+ std::string max_str = get_part_str(ctrl_parts, "max_file_size", "0");
+
+ std::string err;
+ const std::size_t max_file_size =
+ static_cast<uint64_t>(strict_strtoll(max_str.c_str(), 10, &err));
+
+ if (! err.empty()) {
+ ldout(s->cct, 5) << "failed to parse FormPost's max_file_size: " << err
+ << dendl;
+ return 0;
+ }
+
+ return max_file_size;
+}
+
bool RGWFormPost::is_non_expired()
{
std::string expires = get_part_str(ctrl_parts, "expires", "0");
}
} while (! stream_done);
+ min_len = 0;
+ max_len = get_max_file_size();
+
if (! current_data_part) {
err_msg = "FormPost: no files to process";
return -EINVAL;
class RGWFormPost : public RGWPostObj_ObjStore {
std::string get_current_filename() const override;
+ std::size_t get_max_file_size() /*const*/;
bool is_next_file_to_upload() override;
bool is_integral();
bool is_non_expired();