NetTalk Central

Author Topic: WebAPI File upload - how?  (Read 3014 times)

jenseden

  • Newbie
  • *
  • Posts: 6
    • View Profile
    • Email
WebAPI File upload - how?
« on: October 06, 2019, 03:07:53 AM »
Hi all,

my web API must be able to receive a file from the client. The example provided uses a web form for uploading a file, but I need this functionality in a Web API method. What would be the "right" way to do this? I am on NT11.22.
Thanks in advance,
Jens

Matthew51

  • Full Member
  • ***
  • Posts: 151
    • View Profile
    • Email
Contractor with 10+ years of NetTalk experience looking for work.
www.linkedin.com/in/matthew-leavitt
BisWare.ca
Check out my free EasyTime Template

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11179
    • View Profile
Re: WebAPI File upload - how?
« Reply #2 on: October 09, 2019, 02:48:54 AM »
Hi Jens,

<< my web API must be able to receive a file from the client.

so set a parameter of type "file".

>> The example provided

which example? File Upload (26)? that's no a Web API example.

>> What would be the "right" way to do this?

Create a WebServiceMethod procedure, with a parameter of type FILE.

cheers
Bruce