Answer the question
In order to leave comments, you need to log in
Dropzone output from base and display?
1. Hello everyone, guys who worked with DropZone, tell me, I'm deducing from the display base for editing, how to make them accept DropZone, that is, I loaded them, they were displayed, how to do the same only when outputting from the database?
2. How to display loaded names in Input, that is, after a successful load, a json array was added [{"id":1,"name":"poster.jpg"}]
and after the next load it was supplemented, like this
[{"id":1,"name":"poster.jpg"},{"id":2,"name":"poster_2.jpg"}]
, as I understand it, you need to do it in the success function: var input = document.getElementById('poster');
if( input.value.length == 0 ) {
// Здесь будет первое загруженное изображение.
}
else
{
// Если input не пустой значит изображение есть, здесь мы выполняем последующие добавление .push()
var mass = [];
mass.push( file.name ); // Добавляем название файла в массив
mass = JSON.stringify( mass );
input.val( mass );
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question