Modified so works with both Content and file urls