Hi Dean,
Yes you can do such a transmission.
Packets generated in NS-3 may be 'dummy' meaning that they only have a predefined size but no actual payload, or 'real' where the payload is generated from some buffer.
You can create a custom application (client/server) to read a file to a buffer, generate packets from that buffer, send them using TCP or UDP sockets, and then at the server side read the buffers, append the content to a buffer and hence reconstructing the original file.
Some useful information from NS-3 documentation about creating packets with real data and creating new applications.
Regards,
K.