Is it Possible to Recreate a File Using Only its Hash?
Theoretically yes, technically extremely difficult even though hashes are mathematically irreversible functions.
Lets take an example. Maximum input size for a SHA1 algorithm is 2^64−1 bits. So with a hashing algorithm you apparently are mapping all possible files under 2^64−1 bits to a fixed length 160 bit value.
So theoretically there can be numerous collisions as we are mapping from a larger set to a smaller set.
In that case if there is a lookup table with hashes of all possible values of {M} we can look up the hash values in table and can narrow down the possible messages for a hash to a handful of collisions that hash value can have. In the above example, if hash value A is given, we can be certain that the message would be either M1 or M4 or M10. If we know the approximate size of the file, an educated guess can be made to pin point the actual message.
Technically it is quite impossible because of the large number of possible messages.