Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

814
Visualizações
Dropzone - how to prevent Remove File link appearing after file upload

In my Spring MVC application, I have implemented a Dropzone, using the dropzone.js library. This works great and my JavaScript config is pasted below.

Dropzone.options.frmTarget = {
        autoProcessQueue: false,
        paramName: 'file',
        clickable: true,
        maxFilesize: 20,
        uploadMultiple: false,
        parallelUploads: 10,
        maxFiles: 20,
        addRemoveLinks: true,
        acceptedFiles: '.png,.jpg,.pdf,.doc,.docx,.xls, .xlsx,.xml,.bmp,.msg,.txt',
        dictDefaultMessage: 'Drag files or click here to select',
        init: function () {
            var myDropzone = this;
            myDropzone.removeAllFiles();

        // Update selector to match your button
        $("#button").click(function (e) {
            e.preventDefault();
            myDropzone.processQueue();
        });
        $("#button1").click(function (e) {
            e.preventDefault();
            myDropzone.removeAllFiles();
        });
    }
}

There is one small part of the behaviour that I would like to change if possible. I have set autoProcessQueue to false, which means that the files are not uploaded as soon as they are dropped into the Dropzone. Instead, the whole queue is processed when the user clicks a button.

I have also set addRemoveLinks to true. This means that when I add my files to the Dropzone, I have the option of removing them individually before processing the queue by clicking the "Remove File" link that appears below the icon of each file. When the queue is being processed, the link text changes to "Cancel Upload" and it changes back to "Remove File" after uploading the file. This can be seen in the image below, which shows my Dropzone after an upload event.

Dropzone

While it is really useful to have the "Remove File" link before processing the queue and the "Cancel Upload" link during upload, I would like to not display the "Remove File" link after upload. Ideally, there would be nothing at all, or text (not a link) saying "File processed". I would be very grateful for any advice on the best way to do this, many thanks for reading.

about 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda