I just ran a quick test using a hosted feature service and attachments and was able to view them in a 4.2 popup. Here's my test code:
<!DOCTYPE html>
<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"
/>
<meta name="description" content="[Multiple popup elements - 4.2]">
<!--
ArcGIS API for JavaScript, https://js.arcgis.com
For more information about the popup-multipleelements sample, read the original sample description at developers.arcgis.com.
https://developers.arcgis.com/javascript/latest/popup-multipleelements/index.html
-->
<title>Multiple popup elements - 4.2</title>
<link rel="stylesheet" href="https://js.arcgis.com/4.2/esri/css/main.css">
<link rel="stylesheet" href="https://js.arcgis.com/4.2/dijit/themes/claro/claro.css">
<script src="https://js.arcgis.com/4.2/"></script>
<style>
html,
body,
#mapDiv {
height: 100%;
width: 100%;
margin: 0;
padding: 0;
}
</style>
<script>
require([
"esri/Map",
"esri/views/MapView",
"esri/layers/FeatureLayer",
"dojo/domReady!"
], function(Map, MapView, FeatureLayer) {
var map = new Map({
basemap: "hybrid"
});
var view = new MapView({
container: "mapDiv",
map: map,
center: [-118.399400711028, 34.08713590709093],
zoom: 8,
popup: {
dockEnabled: true,
dockOptions: {
buttonEnabled: false,
breakpoint: false
}
}
});
var featureLayer = new FeatureLayer({
url: "http://services.arcgis.com/V6ZHFr6zdgNZuVG0/ArcGIS/rest/services/grafitti/FeatureServer/0",
popupTemplate: {
title: "Graffitik",
content: [{
type: "fields",
fieldInfos: [{
fieldName: "description",
visible: false,
label: "Details"
}]
}, {
type: "attachments"
}]
},
outFields: ["*"]
});
map.add(featureLayer);
});
</script>
</head>
<body>
<div id="mapDiv"></div>
</body>
</html>