I want to check if the file inside my device exist. When the variable crphoto1 is empty or the file does not exist the "Photo1" json should be {"Photo1", ""}
JObject ph1json = string.IsNullOrEmpty(crphoto1)
? new JObject
{
{"ContactID", crcontactID},
{"Photo1", ""}
}
: new JObject
{
{"ContactID", crcontactID},
{"Photo1", File.ReadAllBytes(crphoto1)}
};