same modification as Bastien but in badly done
merged and improved media storage, and static storage is working