Jotform API: Upload a file

  • TouchLatam
    Fecha de consulta 20 de febrero de 2024, 17:40

    Señores,

    Actualmente nuestra empresa quiere integrar sus propios formularios con los de ustedes, por ello usamos la API, pero en la documentación de la api no muestra como cargar nuestros archivos, según revisé algunos post de personas que consultaba, vi que enviaban el el nombre del archivo que se encuentra ya cargado en su servidor (https://www.jotform.com/uploads/****), pero no dicen como cargar dichos archivos al servidor.

    Jotform Thread 12090701 Screenshot
  • Raymond Jotform Support
    Fecha de respuesta 20 de febrero de 2024, 22:35

    Hi TouchLatam,

    Thanks for reaching out to Jotform Support. Unfortunately, our Spanish Support agents are busy helping other Jotform users at the moment. I'll try to help you in English using Google Translate, but you can reply in whichever language you feel comfortable using. Or, if you'd rather have support in Spanish, let us know and we can have them do that. But, keep in mind that you'd have to wait until they're available again.

    I understand you'd like to be able to submit and upload files to your form through API. I checked our API documentation but couldn't see that this is possible yet. As a workaround to this, you may consider placing a link to a previously uploaded file the posting the file link with an API command like so:

    submission[questionID]=UPLOADED_FILE_URL

    We've gone ahead and escalated your request to our developers, but when or if it's developed depends on their workload, how viable it is, and how many other users also request it. If there are any updates, we’ll circle back to this thread and let you know.

    Thanks for your patience and understanding, we appreciate it.

  • TouchLatam
    Fecha de respuesta 21 de febrero de 2024, 1:21

    No hay problema con usar el traductor,

    Bueno he seguido su recomendación de enviar una url con la ubicación de mi imagen:

    Jotform API: Upload a file Image 1 Screenshot 40
    Pero al momento de revisar la información cargada desde su web (https://www.jotform.com/inbox/240444446249660/5843052018763620494)

    Intentarmente entiendo que su api limpia el código y remueve caracteres como "/", como puede observar en la siguiente imagen:

    Jotform API: Upload a file Image 2 Screenshot 51
    Jotform API: Upload a file Image 3 Screenshot 62

    No se si tiene otra sugerencia de, lo intenté con un widget de fotos, y funciona bien con las urls pero necesito uno que tenga la opción de multiples files y este no tiene.

  • Raymond Jotform Support
    Fecha de respuesta 21 de febrero de 2024, 2:01

    Hi TouchLatam,

    The link works correctly, however, it's inaccessible unless you're logged in to your account. By default, files uploaded on your account can only be accessed by you as the form owner when logged in to your account. To stop our system from asking you to login to see/download your submission attachments, we just need to disable the requirement to Login to View Uploaded Files. It's easy to do, but we'll need to do that on the Desktop version of Jotform because it's not available yet on the Jotform Mobile App. Let me walk you through it:

    • Login to your Jotform account.
    • Hover your mouse over your Avatar/Profile picture on the right side of the screen.
    • In the dropdown, click on Settings, or click on this link to go directly to your Settings page.
    • On the Settings page, scroll down to the Privacy section and uncheck the box next to Require Login to View Uploaded Files.

    1653978438 6295b546c8243 Require login t Screenshot 10 Screenshot 10

    That's it. Now, you won't have to login to see/download files uploaded with your submissions.

    Give it a try and let us know if you need any help.

  • TouchLatam
    Fecha de respuesta 21 de febrero de 2024, 3:40

    El problema no es la configuración (ya que estoy conectado a mi cuenta y es así como quiero acceder a esta información, no deseo que sea pública), el link enviado solo es para que tenga en cuenta que entré a mi inbox a revisar el submit realizado desde la API, que envié dicho link, pero los links enviados (con las imágenes) han tenido un tratamiento al momento de cargarlos a la api, no me muestra las imágenes como ve en las capturas enviadas anteriormente.
    Tiene otra sugerencia de como realizar el envío o si es posible la carga de archivos directamente a su repositorio, porqué no indica nada en su documentación.

  • Lars Jotform Support
    Fecha de respuesta 21 de febrero de 2024, 14:11

    Hi TouchLatam,

    I've tested from my side as well, and I'm running into the same issue as you. Even with the URL for the file, it will just save the URL and add the Jotform prefix to it. I've added this information to the escalation, as well as requesting that a note could be added to the API, either mentioning that file uploads aren't supported at the moment or adding an example of how to do it if it is possible.

    If you have any other questions while we wait for the developers, please don't hesitate to reach out.