Add user to Resource.

This commit is contained in:
Yang Luo
2021-09-05 23:46:38 +08:00
parent 90ec8ec787
commit a1b16f88d1
6 changed files with 26 additions and 5 deletions

View File

@ -58,7 +58,7 @@ export const CropperDiv = (props) => {
// Setting.showMessage("success", "uploading...");
const extension = image.substring(image.indexOf('/') + 1, image.indexOf(';base64'));
const fullFilePath = `avatar/${user.owner}/${user.name}.${extension}`;
ResourceBackend.uploadResource("admin", "avatar", account.name, fullFilePath, blob)
ResourceBackend.uploadResource(user.owner, user.name, "avatar", account.name, fullFilePath, blob)
.then((res) => {
if (res.status === "ok") {
window.location.href = "/account";