File Upload Field not using React Component

5 Comentarios

  • Greg Katechis
    Zendesk Developer Advocacy

    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!

    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.

    <div>
            <label for="incidentAttachment">Incident Attachment</label><br />
            <input id="incidentAttachment" type="file" />
    </div>

    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
    Zendesk Developer Advocacy
    Ah, I see...to be honest, I'm not sure what would cause this. Can you replicate this on multiple browsers? Does it persist after a restart? I have a very basic app that uses the file loader and it's working for me, so there isn't something within our apps framework that would be causing this. If it still doesn't work after trying the above steps, could you put the basic functionality up on jsfiddle.net or glitch.com so that I could take a look at it?
    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

    0
  • Greg Katechis
    Zendesk Developer Advocacy
    Hi Benessa, glad to hear you got that working! I have done this a few times over the years, I don't have a lot of expertise though. I usually just utilize MDN for topics like this. Is there something specific that I could help with in this situation?
    0

Iniciar sesión para dejar un comentario.

Tecnología de Zendesk