Attach an image when node is created using AMFServer

Events happening in the community are now at Drupal community events on www.drupal.org.
martinbedouret's picture

Hi all,
I'm using drupal 7 and AMFServer (in services 3.0) to create node content from a Flash Client.
I'm able both to upload files and create nodes separately without problems, doing two different service calls (one to "file" service and another to the "node" service).
But I'm not being able to create a node with the a "File" field and attaching the file in the "node create" service call.
Is it possible to do that? I need to have the file "attached" to the node, instead of a node and a file in a separate way.
Thanks,
Martin

Comments

yes, you can!

trudog's picture
  • add a node with node/add/your_content_type;
  • print_r(node_load($created_node_nid);
  • send the fid to node.create in the same format as printed in step 2;

Services

Group organizers

Group categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week