Let's suppose I have a simple content type with
file fields, and
file field is multi value. I create a piece of content and upload some file in my field. Finally my content is something like
title : my title
body : somebody text come in body
I can change the order of files in node edit by drag them up or down, I want to know how I can load a file programmatically by its weight. I mean I want to upload a file that is shown first or second in node edit mode. How can I upload file form node programmatically, ordering by weight?