added data uri functionality for localfiles