#ifndef CONTENT_H
#define CONTENT_H
#include <cppcms/view.h>
#include <cppcms/form.h>
#include <iostream>
namespace content {
file_form()
{
description.
message(
"Image Description");
description.non_empty();
image.message("Image to upload");
image.help("PNG or JPEG only allowed under 100Kb");
image.non_empty();
image.limits(0,100*1024);
image.add_valid_magic("\x89\x50\x4e\x47\x0D\x0A\x1A\x0A");
image.add_valid_magic("\xff\xd8");
submit.value("Upload");
add(description);
add(image);
add(submit);
}
};
file_form info;
};
}
#endif