NetTalk Central

Author Topic: Send a file to NTWS from others platform like Symfony  (Read 3284 times)

Robert Iliuta

  • Sr. Member
  • ****
  • Posts: 472
    • View Profile
    • Email
Send a file to NTWS from others platform like Symfony
« on: October 27, 2015, 12:04:08 AM »
Hallo,


I have some clients that work with Symfony Framework. I develop an NTWS for them but now they need to send some files from Symfony to NTWS ... in a directory like uploads for example.
Is there a format for the post that I should send them? or do i need to make a web service for this? (rest?)
What is the easy way for this? ;-)

Thank you for any help!

Regards,
Robert

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Send a file to NTWS from others platform like Symfony
« Reply #1 on: October 28, 2015, 11:41:03 PM »
Hi Robert,

There are two ways to so this.

The easiest is to make a web service. Creating a method, and adding a file-upload to the method are all easy to do. Plus it will automatically support both web-encoded posts, or XML posts, whichever is more useful to the client.

WebServices are specifically for doing what you are needing - one program communicating with another program. I would strongly recommend doing it this way.

The alternative is to create a NetWebForm, with a file upload field and the other software can "mimic" a user on this form. This is more work for you, a LOT more work for them, and is subject to breaking if nettalk changes the specifics of what is required from a form.

Because of the security layers in NetTalk it's not enough for them just to POST to the form - they would first have to "open" the form with a GET, then POST the reply (including passing back the FormState and Session ID). Like I say, it's more work.

cheers
Bruce