Updated attachFile method to use postValue instead of value.