I’m not positive, but based on this thread, you can do it through WordPress > Create a media item > File > Map.
You’d map the data from HTTP > Get a file and the file name from text functions.
Remember to create the media item before creating the post.