todoDepends on D4088
Adding the terminate callback to the add attachment reactor. It pushes an empty chunk to the put reactor which indicates that there are not going to be any more chunks, waits until it terminates, and after that, stores the newly uploaded attachment into the database.