convert files to data URIs