Depends on D4112
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 intots the attachment data in the database.