Let's suppose I have a simple content type with title
, body
and 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
file :
file1
file2
file3
My question
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?