This commit is contained in:
@@ -229,7 +229,7 @@ export default {
|
||||
window.$gz.dialog.confirmDelete().then(dialogResult => {
|
||||
if (dialogResult == true) {
|
||||
window.$gz.api
|
||||
.remove("Attachment/" + vm.editId)
|
||||
.remove("attachment/" + vm.editId)
|
||||
.then(res => {
|
||||
if (res.error) {
|
||||
window.$gz.errorHandler.handleFormError(res.error);
|
||||
@@ -250,7 +250,7 @@ export default {
|
||||
getList() {
|
||||
let vm = this;
|
||||
window.$gz.api
|
||||
.get("Attachment/list?ayatype=" + vm.ayaType + "&ayaid=" + vm.ayaId)
|
||||
.get("attachment/list?ayatype=" + vm.ayaType + "&ayaid=" + vm.ayaId)
|
||||
.then(res => {
|
||||
if (res.error) {
|
||||
window.$gz.errorHandler.handleFormError(res.error);
|
||||
@@ -274,7 +274,7 @@ export default {
|
||||
let ret = [];
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
let o = data[i];
|
||||
//http://localhost:7575/api/v8/Attachment/download/100?t=sssss
|
||||
//http://localhost:7575/api/v8/attachment/download/100?t=sssss
|
||||
ret.push({
|
||||
id: o.id,
|
||||
concurrency: o.concurrency,
|
||||
@@ -340,7 +340,7 @@ export default {
|
||||
};
|
||||
|
||||
window.$gz.api
|
||||
.upsert("Attachment/" + vm.editId, p)
|
||||
.upsert("attachment/" + vm.editId, p)
|
||||
.then(res => {
|
||||
if (res.error) {
|
||||
window.$gz.errorHandler.handleFormError(res.error);
|
||||
|
||||
@@ -821,7 +821,7 @@ export default {
|
||||
let vm = this;
|
||||
vm.attachments = [];
|
||||
window.$gz.api
|
||||
.get("Attachment/list?ayatype=" + vm.ayaType + "&ayaid=" + vm.ayaId)
|
||||
.get("attachment/list?ayatype=" + vm.ayaType + "&ayaid=" + vm.ayaId)
|
||||
.then(res => {
|
||||
if (res.error) {
|
||||
window.$gz.errorHandler.handleFormError(res.error);
|
||||
@@ -929,12 +929,12 @@ export default {
|
||||
insertUrl(url, name) {
|
||||
if (url) {
|
||||
let isImageUrl = false;
|
||||
//Attachment?
|
||||
if (url.includes("Attachment/download/")) {
|
||||
//attachment?
|
||||
if (url.includes("attachment/download/")) {
|
||||
//it's an attachment url so fixup accordingly
|
||||
//i paramter added by gzapi::downloadUrl function
|
||||
isImageUrl = url.includes("&i=");
|
||||
let m = url.match(/Attachment\/download\/(.*)\?t=/);
|
||||
let m = url.match(/attachment\/download\/(.*)\?t=/);
|
||||
if (m.length > 1) {
|
||||
url = "[ATTACH:" + m[1] + "]";
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user