0

When a file is uploaded to a php server, I am trying to figure out a way to get files sorted. What I want to do is add a custom tag to each file programmaticly in android, upload it to the server (which I have alreay done), and read that tag through a php script.

Thanks for the help

Mason M
  • 67
  • 8

1 Answers1

0

Exif seems to be the way to go for adding metadata to an image. See this related question.

I actually don't think this is the best way to solve you problem. You shouldn't modify the physical image just to introduce some ordering. What exactly do you want to accomplish? You just want to have the same order on the server that you had on the device? What about you send the order in a separate piece of data, say JSON or so?

Community
  • 1
  • 1
SimonSays
  • 10,867
  • 7
  • 44
  • 59
  • I should've been more clear. On the server there are different folders. In the app, a person can add a tag. When the file is uploaded, the server will read the tag and sort it into the appropriate folder. – Mason M Oct 15 '14 at 17:50
  • You could still have that information separate from the actual image. Like: `{[name:"img1.jpg", tag:"myimages"], [...], ...}`. OR add the tag as metadata with Exif. – SimonSays Oct 15 '14 at 17:59