596,597c596,614
< 		// url
< 		newItem.url = mods.m::location.m::url.text().toString();
---
> 		// attachments and url
> 		for each(var url in mods.m::location.m::url) {
> 			var value = url.text().toString();
> 			if (url.@access == "raw object") {
> 				var filetitle;
> 				if (url.@displayLabel){
> 					filetitle = url.@displayLabel;
> 				} else {
> 					filetitle = "Attachment";
> 				}
> 				if (value.substr(-4,4)==".pdf") {
> 					newItem.attachments.push({url:value, mimeType:"application/pdf", title:filetitle, downloadable:true});
> 				} else {
> 					newItem.attachments.push({url:value, title:filetitle, downloadable:true});
> 				}
> 			} else {
> 				newItem.url = value;
> 			}
> 		}
