How to link to files using a relative path?
Did you try file_create_url() ?

$file_uri = file_create_url(file_build_uri('images/example.jpeg'));

The above snippet will give the file URL. Besides, I recommend transliteration module for the sites that deals with file uploads.