Added supports of /shares and /media

This patch adds supports of /shares and /media.