Liferay.Loader.define("item-selector-taglib@5.2.9/item_selector_uploader/js/utils/sendFile",["module","exports","require"],(function(e,t,n){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function({file:t,fileFieldName:n,onProgress:r=e,onSuccess:s=e,onError:o=e,url:a}){const d=new FormData,l=new XMLHttpRequest;return l.upload.addEventListener("progress",(e=>{r(Math.round(100*e.loaded/e.total))})),l.addEventListener("readystatechange",(()=>{if(4===l.readyState){const e=function(e){let t;try{t=JSON.parse(e.responseText)}catch(n){t=e.responseText}return t}(l);r(null),l.status>=200&&l.status<300?s(e):o(e)}})),d.append(n,t),l.open("POST",a),l.send(d),l};const e=()=>{}}}));
//# sourceMappingURL=sendFile.js.map