I have not done this but I believe you will want to utilize the Javascript API to do things outside of Tableau (since you can't upload directly to Tableau Server from a viz). I think one option might be to upload to a place that is monitored for importing into Tableau. The file uploaded would need to be identical in format so a union to the original data source could work.