thanks for the explination it makes sense,
I am sure I am missing something important here, but even when using your updated version for the second part all i get is encrypted gumble, instead of the file opening in the browser, what am I doing wrong?