new correction

This commit is contained in:
Fateme
2020-07-04 23:26:44 +04:30
parent a74e49af6f
commit 1f1be72d74
21 changed files with 161 additions and 107 deletions
@@ -10,8 +10,8 @@
@vdropzone-error = "error"
class="WM-Relative" >
<div class="dropzone-custom-content">
<!-- <h3 class="dropzone-custom-title">فایل مورد نظر خود را در این قسمت آپلود کنید</h3> -->
<div class="subtitle">Upload images here</div>
<h3 class="dropzone-custom-title">Upload your files here</h3>
<div class="subtitle">image or pdf or word</div>
</div>
</vue-dropzone>
</div>
@@ -33,7 +33,7 @@
},
data: () => ({
dropzoneOptions: {
url: '/api/UploadImage',
url: '/api/UploadFile',
thumbnailWidth: 150,
maxFilesize: 2,
headers: { "Authorization": `Bearer ${TokenService.getToken()}` },
@@ -48,7 +48,7 @@
let vm = this;
if (vm.Images != null) {
vm.Images.forEach(function(image, key){
var file = { name: image.file_name, size:'1024', type: 'jpg', id: image.id};
var file = { name: image.file_name, size:'1024', type: ' ', id: image.id};
vm.$refs.myVueDropzone.manuallyAddFile(file, '/'+image.path);
});
}
@@ -69,7 +69,7 @@
}
},
sending(file, xhr, form_data) {
form_data.append('image', file);
form_data.append('file', file);
form_data.append('model_id', this.ModelID);
form_data.append('model_type', this.ModelType);
form_data.append('batch_id', this.BatchID);
@@ -87,7 +87,7 @@
formdata.append('model_id', this.ModelID);
formdata.append('model_type', this.ModelType);
formdata.append('batch_id', this.BatchID);
let result = await ApiService.post(urls.deleteImage,formdata);
let result = await ApiService.post(urls.deleteFile,formdata);
}
},
}