Pennebaker / craftcms-thearchitect

CraftCMS plugin to generate content models from JSON data.
MIT License
171 stars 9 forks source link

Assets options #5

Closed billymedia closed 8 years ago

billymedia commented 8 years ago

I am trying to create an Assets field, what do i put in the following options:

"defaultUploadLocationSource": "", No matter what i put here, it throws an error.

"restrictFiles": true, How to i specify what to restrict? e.g. images

Emkaytoo commented 8 years ago

You can restrict files pretty easily using the "allowedKinds" handle. It takes an array of the types that you would find in the assets field. I've updated the Assets wiki page to show an example (our bad for leaving it out).

We can look into the "defaultUploadLocationSource" issue.

spAnser commented 8 years ago

Assets wiki page updated. It had some incorrect info related to that part.

            "defaultUploadLocationSource": "1", // Asset Source ID change after field creation unless you know it.
            "defaultUploadLocationSubpath": "path/to/subfolder",
billymedia commented 8 years ago

Perfect, thanks.