decorate feature service attachment responses w/ full urls?
#371 opened on Oct 19, 2018
Repository metrics
- Stars
- (389 stars)
- PR merge metrics
- (PR metrics pending)
Description
@jPurush was going to add this code that we use in the Hub to Hub.js:
I wonder if instead of adding it there if rest-js should be decorating the getAttachments() responses w/ the full url similar to the the suggestion for thumbnail urls #323?
As w/ that issue, I'm a bit wary of appending the token. Also it looks like the ?v= parameter is not necessarily supported by the API, but is something we added in the Hub for cache busting. Not sure if we should add that in all cases.
Alternatively, we could provide a getAttachmentUrl(featureServiceUrl: string, attachmentId: number, authentication?: IAuthenticationManager) util fn and let people .map() over the attachment infos to get the URLs themselves?