A token is appended to a feature service request but not to the attachment request.
Bug ID Number
January 8, 2016
December 1, 2020
Operating System Version
7.0 64 Bit
After review by the development team, it has been determined that this issue is related to a known limitation with the software that lies outside of Esri's control. The issue's Additional Information section may contain further explanation.
mediaInfos is not designed to pass the token property back to the set URL. The best suggestion is to work with the image as an attachment for the token to be passed through properly, or grab the generated token from the initial login and dynamically add this to the URL in mediaInfos.