File group changes..
This commit is contained in:
parent
4631253bd9
commit
55ef9559eb
@ -195,6 +195,7 @@ export default {
|
||||
size: attachment.size,
|
||||
type: attachment.type,
|
||||
download: attachment.downloadPath,
|
||||
dropzone: 'edit',
|
||||
};
|
||||
|
||||
dropzone.emit("addedfile", mockFile);
|
||||
|
6
resources/assets/js/plugins/form.js
vendored
6
resources/assets/js/plugins/form.js
vendored
@ -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 + ']');
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user