@RequestMapping(value="/write", method = RequestMethod.POST)
public String addThought(ModelMap model, HttpServletRequest request, HttpServletResponse response) {
String userThought = null, name = null;
try {
ServletFileUpload upload = new ServletFileUpload();
FileItemIterator iterator = upload.getItemIterator(request);
byte[] image = null;
String contentType = null;
while (iterator.hasNext()) {
FileItemStream fileItem = iterator.next();
InputStream stream = fileItem.openStream();
if (fileItem.isFormField()) {
switch (fileItem.getFieldName()) {
case "thought":