top of page

Our Services

GALLERY

Featured Showcase

WechatIMG17.jpeg
WechatIMG10.jpeg
WechatIMG16.jpeg
WechatIMG5.jpeg
WechatIMG52.jpeg
WechatIMG1.jpeg
WechatIMG36.jpeg
WechatIMG65.jpeg
bottom of page
import wixData from 'wix-data'; export function button1_click(event) { let file = $w("#uploadButton").value[0]; let url = await uploadFile(file); let memberId = wixUsers.currentUser.id; wixData.get("Members", memberId) .then((member) => { member.profilePhoto = url; return member.save(); }) .catch((err) => { console.log(err); }); } function uploadFile(file) { return new Promise((resolve, reject) => { let name = file.name; let type = file.type; let size = file.size; wixData.getUploadUrl() .then((uploadUrl) => { return fetch(uploadUrl, { method: "PUT", headers: { "Content-Type": type, "Content-Length": size }, body: file }); }) .then((response) => { if (response.ok) { resolve(name); } else { reject(response.statusText); } }) .catch((err) => { reject(err); }); }); }