Answers.Body: <p>Turns out that, because the <code>images</code> field can work with assets in more than one folder, FeedMe only looks at the <strong>default</strong> folder assigned to the Assets field (in the Matrix block field setting).</p>
  <p>So a way to resolve the above is to:</p>
  <ol>
  <li>Constrain feed data to only <strong>one folder</strong> that the field can receive</li>
  <li>Set the Assets field to that folder as its <strong>default</strong></li>
  <li>Run the feed</li>
  <li>Revert the field to the preferred default.</li>
  </ol>
  <p>It then works.</p>
  <hr />
  <p>It would be great if FeedMe could search all folders (filesystems) assigned to the field.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-08-25T12:42:11.733Z
Answers.LastActivityDate: 2024-08-25T12:42:11.733Z
Answers.UserDisplayName: Jonathan Schofield
Body: <p>I am an experienced user of FeedMe but I cannot get it to recognise an array of asset filenames in a Matrix block:</p>
  <ul>
  <li>The FeedMe config sees my JSON node for the assets, and allows me to save it into the config.</li>
  <li>The images cited <em>already exist as assets</em></li>
  <li>It recognises a sibling node for a text field in the same block.</li>
  <li>On import it creates the block and the text, but ignores the assigned assets.</li>
  </ul>
  <p>I have many times imported into Assets fields but not in a multisite context before.</p>
  <p>Because it is multisite, I have tried making the image references absolute URLs as well, but that doesn’t help either.</p>
  <p>As per the docs on <a href="https://docs.craftcms.com/feed-me/v6/guides/importing-into-matrix.html#example-feed-data" rel="nofollow noreferrer">importing into matrix</a> I have JSON which looks like this:</p>
  <pre><code>{&quot;entries&quot;:[
      {
          &quot;fieldHandle&quot;:&quot;value&quot;, 
          &quot;matrixFieldHandle&quot;:{
              &quot;block&quot;:[{
                  &quot;blockHandle&quot;: {
                      &quot;text&quot;:&quot;my text&quot;, 
                      &quot;images&quot;:[
                          &quot;filename.jpg&quot;
                      ]
                  }
              }]
          }
      }
  ]}
  </code></pre>
  
Tags: <assets><matrix><plugin-feedme>
Title: FeedMe: glitches with importing assets into an assets field in a Matrix block (multisite instance)
ThreadText: # FeedMe: glitches with importing assets into an assets field in a Matrix block (multisite instance)
  
  (Asked by: username_0 on 2024-08-25)
  
  I am an experienced user of FeedMe but I cannot get it to recognise an array of asset filenames in a Matrix block:
  
  * The FeedMe config sees my JSON node for the assets, and allows me to save it into the config.
  * The images cited *already exist as assets*
  * It recognises a sibling node for a text field in the same block.
  * On import it creates the block and the text, but ignores the assigned assets.
  
  I have many times imported into Assets fields but not in a multisite context before.
  
  Because it is multisite, I have tried making the image references absolute URLs as well, but that doesn’t help either.
  
  As per the docs on [importing into matrix](https://docs.craftcms.com/feed-me/v6/guides/importing-into-matrix.html#example-feed-data) I have JSON which looks like this:
  
  ```
  {"entries":[
      {
          "fieldHandle":"value", 
          "matrixFieldHandle":{
              "block":[{
                  "blockHandle": {
                      "text":"my text", 
                      "images":[
                          "filename.jpg"
                      ]
                  }
              }]
          }
      }
  ]}
  
  ```
  
  **Tags:** assets, matrix, plugin-feedme
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2024-08-25. Score: 1
  
  Turns out that, because the `images` field can work with assets in more than one folder, FeedMe only looks at the **default** folder assigned to the Assets field (in the Matrix block field setting).
  
  So a way to resolve the above is to:
  
  1. Constrain feed data to only **one folder** that the field can receive
  2. Set the Assets field to that folder as its **default**
  3. Run the feed
  4. Revert the field to the preferred default.
  
  It then works.
  
  ---
  
  It would be great if FeedMe could search all folders (filesystems) assigned to the field.
  
  
  ---
  
  