Búsquedas recientes
No hay búsquedas recientes
File Upload Field not using React Component
Publicado 29 jun 2022
Hello, good day.
I am building a custom app and would need to use the file upload field. However, all I can find on Zendesk Garden is the file upload React Component. The app is not built on React, so using the React Component is not an option. I tried using the HTML file upload field but it's not working. When I tried clicking Choose File button, it doesn't do anything.
<div class="c-txt">
<label for="incidentAttachment">Incident Attachment</label><br />
<input id="incidentAttachment" type="file" />
</div>
Is there a way to have the file upload field without using the React Component?
I hope someone can help me.
Thank you in advance,
Benessa
0
5
5 comentarios
Greg Katechis
0
Benessa Dumol
Hello Greg Katechis,
I was able to make the file loader work.
I forgot I have event.preventDefault(); on my main.js file that why it wasn't working previously.
May I ask if you have any experience with sending files to a 3rd-party via the file upload field?
Looking forward to your reply.
Thank you,
Benessa
1
Greg Katechis
0
Benessa Dumol
Hi Greg Katechis, thank you for the prompt response.
I am actually looking at sending an attachment to a 3rd-party (Ivanti) via the custom app that I created but I can't figure out why the HTML file upload field is not working.
When I tried clicking Choose File button, it doesn't do anything or open the folder so that I can browse and select the file that I want to upload.
You can check my screen capture here so that you'll understand better what I meant.
I hope you can take a look at this and get back to me with what you think is causing the issue.
Thank you,
Benessa
0
Greg Katechis
Hi Benessa! Assuming that you are looking to upload and attach a file to a Zendesk ticket, ZAF doesn't have a method to handle file upload, so this is something that you would need to build using the API. We do have a tutorial for this using our APIs, but it isn't within the context of a ZAF app, so you would need to use something like fetch() to make the requests to the API.
Let us know if you have any questions about this!
1
Iniciar sesión para dejar un comentario.