I'm struggling to imagine the real world application for this, but...
How are you "downloading"? Would this be driven by a user or triggered from code? What protocol (http[s], ftp, sftp, scp, rcp, smb....)?
Where does the encrypted drive figure? If the drive is not mounted you can't read or write to it. If the system doesn't know the encyption key it can't mount the drive. There is no such thing as a write only filesystem.
You can ancrypt the file on the device in such a way that the device cannot retrieve the plain text.
Assuming its simply http without relying a cookie based session,then
- you can use curl or wget to copy the file to a ram disk,
- then use a public key (gpg or openssl) to create an encrypted file on non-volatile storage,
- Shred the plain text copy on the ram disk
The plain text can be recovered using the private key (which is stored elsewhere).