× Please submit new Bug Reports on GitHub: github.com/Jensen-Technologies/component-creator-issues/issues

How to retain a previously uploaded file?

8 anos 1 mês atrás - 8 anos 1 mês atrás #1435 por Greg Podesta
How to retain a previously uploaded file? foi criado por Greg Podesta
I'm using a File input to allow uploading a file that is relevant to the record and all works as expected, except one critical thing:

When the item form is initially displayed for editing, a link to the file appears and works, but submitting other updates blanks out the field.
Surely this isn't expected behavior, so I'm not sure what I'm doing wrong. I want to be able to save the record, leaving the previously uploaded file intact.

Also, on a slightly related note, is there "somewhere", perhaps a plugin where the uploaded file can be processed at the time of upload (to extract certain metadata from within the file itself)?

FURTHER OBSERVATIONS:

I see that the originally uploaded file is being retained in a hidden input field, so I see that it "should" be retained, however something weird is happening:
<input type="hidden" name="jform[agenda_pdf][]" id="jform_agenda_pdf_hidden" value="0Agenda.pdf" />

When the Submit button is clicked, this hidden field is NOT included in the fields that are posted, thus the code in the table is blanking it out as it should. I see some javascript that is manipulating this value on submission, but I can't see to follow what is going on, so can't see why this field is being excluded from the POST.
Ultima edição: 8 anos 1 mês atrás por Greg Podesta.

Por favor Acessar ou Registrar para participar da conversa.

7 anos 10 meses atrás #1458 por Santiago Crespo Calvo - NIF 29159210V
Respondido por Santiago Crespo Calvo - NIF 29159210V no tópico How to retain a previously uploaded file?
Hello

I've the same problem. ¿Have you solved it?

Best regards

Santiago

Por favor Acessar ou Registrar para participar da conversa.

Tempo para a criação da página:0.061 segundos
Powered by Fórum Kunena

We use cookies so that you can place orders and we can provide a better service. You can control the use of cookies at the individual browser level. If you reject cookies, you may still use our website, but your ability to use some features or areas of our website may be limited.