Bug 47103: Prevent undefined photos being added to the page

Make the api throw an error when filename missing

Change-Id: I975007aedeadb75ada35edec35c58868ef497d87
Merge "Bug 47103: Prevent undefined photos being added to the page"