The fields below import without throwing errors, but the single upload/default upload options aren't properly configured. They seem to be defaulting to something weird.
The .json below is the model as written:
{
"fields": [
{
"group": "Resources",
"name": "Resource File",
"handle": "resourceFile",
"instructions": "Select or upload a file for this resource.",
"type": "craft\\fields\\Assets",
"useSingleFolder": true,
"sources": [
"resourceFiles"
],
"defaultUploadLocationSource": "resourceFiles",
"defaultUploadLocationSubpath": "",
"singleUploadLocationSource": "resourceFiles",
"singleUploadLocationSubpath": "",
"restrictFiles": true,
"allowedKinds": [
"compressed",
"excel",
"pdf",
"powerpoint",
"word",
"text"
],
"limit": 1,
"viewMode": "list",
"selectionLabel": "Select a file"
},
{
"group": "Resources",
"name": "Resource Image",
"handle": "resourceImage",
"instructions": "Select or upload an image for this resource.",
"type": "craft\\fields\\Assets",
"useSingleFolder": true,
"sources": [
"resourceImages"
],
"defaultUploadLocationSource": "resourceImages",
"defaultUploadLocationSubpath": "",
"singleUploadLocationSource": "resourceImages",
"singleUploadLocationSubpath": "",
"restrictFiles": true,
"allowedKinds": [
"image"
],
"limit": 1,
"viewMode": "large",
"selectionLabel": "Select an image"
},
{
"group": "Resources",
"name": "Video",
"handle": "video",
"instructions": "Select or upload a video for this resource. This should be in .mp4 format.",
"type": "craft\\fields\\Assets",
"useSingleFolder": true,
"sources": [
"resourceVideos"
],
"defaultUploadLocationSource": "resourceVideos",
"defaultUploadLocationSubpath": "",
"singleUploadLocationSource": "resourceVideos",
"singleUploadLocationSubpath": "",
"restrictFiles": true,
"allowedKinds": [
"video"
],
"limit": 1,
"viewMode": "list",
"selectionLabel": "Select a video"
},
{
"group": "Resources",
"name": "Poster Image",
"handle": "posterImage",
"instructions": "Select or upload a placeholder image for this video.",
"type": "craft\\fields\\Assets",
"useSingleFolder": true,
"sources": [
"resourceImages"
],
"defaultUploadLocationSource": "resourceImages",
"defaultUploadLocationSubpath": "/poster-images",
"singleUploadLocationSource": "resourceImages",
"singleUploadLocationSubpath": "/poster-images",
"restrictFiles": true,
"allowedKinds": [
"image"
],
"limit": 1,
"viewMode": "large",
"selectionLabel": "Select a poster image"
}
]
}
The .json below is the model as exported after import:
{
"fieldGroups": [
"Resources"
],
"fields": [
{
"group": "Resources",
"name": "Poster Image",
"handle": "posterImage",
"instructions": "Select or upload a placeholder image for this video.",
"type": "craft\\fields\\Assets",
"useSingleFolder": true,
"defaultUploadLocationSource": "resourceImages",
"defaultUploadLocationSubpath": "/poster-images",
"singleUploadLocationSource": "resourceImages",
"singleUploadLocationSubpath": "/poster-images",
"restrictFiles": true,
"allowedKinds": [
"image"
],
"sources": [
"resourceImages"
],
"viewMode": "large",
"limit": 1,
"selectionLabel": "Select a poster image",
"localizeRelations": false
},
{
"group": "Resources",
"name": "Resource File",
"handle": "resourceFile",
"instructions": "Select or upload a file for this resource.",
"type": "craft\\fields\\Assets",
"useSingleFolder": true,
"defaultUploadLocationSource": "resourceFiles",
"defaultUploadLocationSubpath": "",
"singleUploadLocationSource": "resourceFiles",
"singleUploadLocationSubpath": "",
"restrictFiles": true,
"allowedKinds": [
"compressed",
"excel",
"pdf",
"powerpoint",
"word",
"text"
],
"sources": [
"resourceFiles"
],
"viewMode": "list",
"limit": 1,
"selectionLabel": "Select a file",
"localizeRelations": false
},
{
"group": "Resources",
"name": "Resource Image",
"handle": "resourceImage",
"instructions": "Select or upload an image for this resource.",
"type": "craft\\fields\\Assets",
"useSingleFolder": true,
"defaultUploadLocationSource": "resourceImages",
"defaultUploadLocationSubpath": "",
"singleUploadLocationSource": "resourceImages",
"singleUploadLocationSubpath": "",
"restrictFiles": true,
"allowedKinds": [
"image"
],
"sources": [
"resourceImages"
],
"viewMode": "large",
"limit": 1,
"selectionLabel": "Select an image",
"localizeRelations": false
},
{
"group": "Resources",
"name": "Video",
"handle": "video",
"instructions": "Select or upload a video for this resource. This should be in .mp4 format.",
"type": "craft\\fields\\Assets",
"useSingleFolder": true,
"defaultUploadLocationSource": "resourceVideos",
"defaultUploadLocationSubpath": "",
"singleUploadLocationSource": "resourceVideos",
"singleUploadLocationSubpath": "",
"restrictFiles": true,
"allowedKinds": [
"video"
],
"sources": [
"resourceVideos"
],
"viewMode": "list",
"limit": 1,
"selectionLabel": "Select a video",
"localizeRelations": false
}
]
}
But, here are some unaltered screenshots of the field settings screens:
The fields below import without throwing errors, but the single upload/default upload options aren't properly configured. They seem to be defaulting to something weird.
The .json below is the model as written:
The .json below is the model as exported after import:
But, here are some unaltered screenshots of the field settings screens:
Resource File:![resource-files](https://user-images.githubusercontent.com/6294225/37884238-964fe6c2-3074-11e8-9a37-0d9833d70b2c.png)
Video:![resource-video](https://user-images.githubusercontent.com/6294225/37884279-d1b45c8e-3074-11e8-9738-2a1293b2e13c.png)