Upload the desired file by clicking on the plus sign.
Click the Sharing icon to share the file or folder.
Now select the person or persons you want to share the file with.
Now click on the three small dots. In the menu which has opened, you can now set an expiration date. The access is now limited until the expiration date.