I needed to upload multiple files in Migx, so I followed this official Modx tutorial step by step:
https://docs.modx.com/3.x/en/extras/migx/migx.tutorials/use-resource-specific-mediasource-and-multifile-uploader
Everything works fine, the only issue is that now every time I click on any TV in the manager an empty directory is created (under “assets/resourceimages/”) named with exactly the same ID as the TV I clicked.
It looks like the snippet migxResourceMediaPath
(from the Media Source “ResourceMediaPath”) gets executed every time you click on a Template, TV or Chunk in the “Elements” tab of the manager.
You probably have to adjust the migxResourceMediaPath
snippet code to avoid this, or maybe just ignore the empty folders. Or set the property &createFolder
to 0
and create the necessary folders manually.
1 Like
Thank you. I changed &createFolder to 0 but its not an ideal solution if you wish to dynamically create a folder for each Migx gallery.
I think migxResourceMediaPath
(system snippet) and/or Migx tutorial needs to be fixed because there’s also another bug when you upload multiple files to a draft that haven’t been saved (without id).
Maybe create an issue for this on github
or try to fix it yourself and make a pull request.
1 Like