How to show file selection dialog?

My project need to upload a file to server. It will behaves differently in different platform. For example, I want to load image from PhotoLibrary in mobile, and to upload a file from the file system in browser. My question is how to show the file selection dialog in my program? Thanks

Have you found a solution for this problem ?