ArcGIS API for JavaScript: DocEx/DocumentRecords_addOnly (FeatureServer)
Built using the ArcGIS API for JavaScript