Setting up an Android device as file server
Sure you can, you just need a samba server implementation on your android device (just like the PC)

Here is a full port of Linux Samba server which is very powerful: Sambadroid

This application allows you to share/manage files on your device easily from any device on your network. Simply start your mobile hotspot and let the devices connect.

Then start sambadroid, a good android file explorer can easily retrive the shares eg ES explorer, you can navigate to LAN>>Servers>>Scan and you should see a server called SambaDroid (unless you customized the name)