Need to know process upload file to DB and get it downloaded

I referred Appian documentation but not much clarity. Image is stored in default path of Appian cloud and we can store document id in DB. Need to know process upload file to DB and get it downloaded using stored documentId from Db, using documentation i could store using ri!variable to DB, but don't know further process, Please give me visualization and required expression to read stored document ID to download it. 

  Discussion posts and replies are publicly visible