File attachment

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • Acknowledged
Hi........can i get  the file attachment in a form on a button click using java script before saving form ?
Photo of Shihad

Shihad

  • 496 Points 250 badge 2x thumb

Posted 2 years ago

  • 0
  • 1
Photo of Matthew Neil

Matthew Neil

  • 31,638 Points 20k badge 2x thumb
Can you explain what you are trying to accomplish in a little more detail?
Photo of Shihad

Shihad

  • 496 Points 250 badge 2x thumb
Ya..

i have a form which contains a file attachment field. I just select a file from my system, and its name will be shown in the form. That i time i want to click a button which send this file to another url (.net). Is that possible. ? I didnt save the record yet.

Thanks
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 59,686 Points 50k badge 2x thumb
I know that Dan Diebolt knows how to do this.
Photo of Matthew Neil

Matthew Neil

  • 31,638 Points 20k badge 2x thumb
I'm fairly confident that you will need to save the record, and then have (possibly) a webhook to send that new file to another url.

Maybe explore webhooks as an option.

I do find it a little odd, you want it to send somewhere, without it first being saved...
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 29,604 Points 20k badge 2x thumb
What URL do you want to POST the file to? You probably have to be logged into that service and there may be additional mandatory fields you have to supply.

FWIW, you don't need to first save the file nor do you even need a file (you can create the file from script).