Index: lams_central/web/profile/portrait.jsp =================================================================== diff -u -r75204c057bac36bbf938738fad5427650d997209 -r40de3afab4e8d589660daffb6efd6e568e87f8fa --- lams_central/web/profile/portrait.jsp (.../portrait.jsp) (revision 75204c057bac36bbf938738fad5427650d997209) +++ lams_central/web/profile/portrait.jsp (.../portrait.jsp) (revision 40de3afab4e8d589660daffb6efd6e568e87f8fa) @@ -1,15 +1,10 @@ - -<%@ page contentType="text/html; charset=utf-8" language="java"%> -<%@ taglib uri="tags-core" prefix="c"%> -<%@ taglib uri="tags-fmt" prefix="fmt"%> -<%@ taglib uri="tags-lams" prefix="lams"%> -<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %> - +<%@ include file="/common/taglibs.jsp"%> <%@ page import="org.lamsfoundation.lams.util.Configuration" %> <%@ page import="org.lamsfoundation.lams.util.ConfigurationKeys" %> <%=Configuration.get(ConfigurationKeys.ENABLE_PORTRAIT_EDITING)%> + @@ -101,35 +96,35 @@ size: { width: PORTRAIT_SIZE, height: PORTRAIT_SIZE, - }, + }, format: 'jpeg', quality: 0.95, backgroundColor: '#FFF', - }).then(function(blob) { + }).then(function(blob) { var formData = new FormData(); formData.append("file", blob); //upload protrait to server side - $.ajax({ + $.ajax({ data : formData, async : false, processData : false, // tell jQuery not to process the data contentType : false, // tell jQuery not to set contentType - type : $("#PortraitActionForm").attr('method'), + type : "post", url : $("#PortraitActionForm").attr('action'), success : function(data) { window.parent.location.reload(); } }); }); } - - + +