Is the use of the apostrophe after "files" correct? Please let me know. Thank you.

One of the files' contents are there in the attachment.
Yes, but it is a very awkward way to go about it.

The contents of one of the files are there in the attachment.
I think it's fine. This structure is similar to

That's a friend of mine's dog. (the appostrophe is attached to the "friend of mine" part, not just to mine).

Likewise, the appostrophe in your example is attached to "one of the files".
Teachers: We supply a list of EFL job vacancies
 Mister Micawber's reply was promoted to an answer.
Thank you, Ivan, Mr Micawber.