File group changes..

This commit is contained in:
Cüneyt Şentürk 2021-02-10 12:07:33 +03:00
parent 4631253bd9
commit 55ef9559eb
3 changed files with 9 additions and 4 deletions

View File

@ -195,6 +195,7 @@ export default {
size: attachment.size,
type: attachment.type,
download: attachment.downloadPath,
dropzone: 'edit',
};
dropzone.emit("addedfile", mockFile);

View File

@ -347,7 +347,11 @@ export default class Form {
submit() {
FormData.prototype.appendRecursive = function(data, wrapper = null) {
for(var name in data) {
for (var name in data) {
if (name == "previewElement" || name == "previewTemplate") {
continue;
}
if (wrapper) {
if ((typeof data[name] == 'object' || Array.isArray(data[name])) && ((data[name] instanceof File != true ) && (data[name] instanceof Blob != true))) {
this.appendRecursive(data[name], wrapper + '[' + name + ']');

View File

@ -57,11 +57,11 @@
@elseif ($value instanceof \Plank\Mediable\Media)
@php
$attachments[] = [
'id' => $attachment->id,
'id' => $value->id,
'name' => $value->filename . '.' . $value->extension,
'path' => route('uploads.get', $value->id),
'type' => $attachment->mime_type,
'size' => $attachment->size,
'type' => $value->mime_type,
'size' => $value->size,
'downloadPath' => false,
];
@endphp