Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the CollectiveAccess support forum! Here the developers and community answer questions related to use of the software. Please include the following information in every new issue posted here:

  1. Version of the software that is used, along with browser and version

  2. If the issue pertains to Providence, Pawtucket or both

  3. What steps you’ve taken to try to resolve the issue

  4. Screenshots demonstrating the issue

  5. The relevant sections of your installation profile or configuration including the codes and settings defined for your local elements.


If your question pertains to data import or export, please also include:

  1. Data sample

  2. Your mapping


Answers may be delayed for posts that do not include sufficient information.

Import Media directory empty - can't mass upload images

Hi, I searched for similar Discussions but couldn't find one. We have a working CA Providence + Pawtucket2 installation.

We can create records and manully import single images and assign them as normal. However, some Items have many images associated with them and after reading, I was hoping to use the Import > Media function to mass upload many images and assign them (they are filenamed perfectly).

The improt directory appears to be the Providence directory, but it does not appear to show the directory and subdirectories as per https://docs.collectiveaccess.org/wiki/Media_import. Instead it shows the attached - empty. As such, I can't see how to mass upload images.

Please assist? Thank you to anyone for any help!

Comments

  • You should check the permissions and make sure the import directory and its contents are, at the least, readable by whatever user the web server is running as.

  • Hi Seth, thank you for your quick response. Yes I checked this - it's 0755 as per the attached. I thought that would be OK?

  • And the directory path is correct? You want it to be within the pawtucket directory?

  • To be honest, I'm not sure on what best practice would be - I thought this was the default? I tried to analyse app.conf to edit the import folder, but I couldn't find the relevant line entry, I'm so sorry.

    This is basically a fresh installation, so I'm happy to be advised on best folder to point to and how to get it working. I thought from my 1st screenshot that CA had /var/www/html/pawtuckets/providence as the import folder, although to be honest I thought the 'media' folder inside there would have been more relevant.

    Thanks again for any help, not sure of best way forward.

  • edited August 8

    The default import folder should be a directory called import under your base installation directory. That is, not just the providence root directory. So if you haven't changed anything it could be /var/www/html/pawtucket2/providence/import. Almost as if your base dir with providence is under the pawtucket2 directory. Which seems a bit odd. Is this where you put your media, in the import dir? Anyway, the line you want to edit to change media import is:
    batch_media_import_root_directory =

    You could change to whatever as long as it has the right permissions. I use a directory in a user named caimports home dir so my line is as follows

    batch_media_import_root_directory = /home/caimport/import

  • Thanks so much Seth, that's starting to make sense. You're right - it is /var/www/html/pawtucket2/providence/import - you just couldn't see the last folder on the UI.

    It seems I don't have folder permissions to upload to there, so I am asking my tech to fix that. However, just checking, so I used a program like WinSCP or similar to 'physically' upload the images to that folder, and then I use CA to import the files into the system? Is that correct? Thanks again!

  • edited August 9
    Yes, that's correct. If you want easier access to the import folder for multiple users and you're in a windows environment you could use a network share as import dir.

    In my example above the /home/caimport/import directory is actually a mounted samba share from our windows domain server. With this setup we can map that samba share to a network drive for users who's working with the database.
  • Hi Seth,

    Thanks again for your help - I now basically have it working much to my delight. However, I have a curly question for you - most records have a 1:1 relationship of image<>record. However, some items have multiple images assoicated with them, and I was hoping to upload with this in mind, and have multiple images import into a single 'item' record.

    You can see from the below 'Media Import' log, that the first 2 worked perfectly, however, the 3rd and 4th didn't as they have been named with 'A' and 'B' suffixes to represent multiples. That is 3A and 3B are 2 images belonging to the item P01-F03-S01-0003.

    Is there any way to do this? I selected 'Match using file name' where identifier 'starts with' value, hoping this would do the trick.

    In short, can I import multiple images per item object using the Media Import? This is what I was hoping to achieve. Thanks as always.

    Errors occurred:
    [pete/P01-F03-S01-0003A.jpg]: Error creating new record while importing P01-F03-S01-0003A.jpg from pete: Item is not a valid type for a top-level record
    [pete/P01-F03-S01-0003B.jpg]: Error creating new record while importing P01-F03-S01-0003B.jpg from pete: Item is not a valid type for a top-level record
    [pete/P01-F03-S01-0004B.jpg]: Error creating new record while importing P01-F03-S01-0004B.jpg from pete: Item is not a valid type for a top-level record
    Processed:
    P01-F03-S01-0001: Matched media P01-F03-S01-0001.jpg from pete to object using expression "Filename without extension"
    P01-F03-S01-0001 (P01-F03-S01-0001): SUCCESS
    P01-F03-S01-0002: Matched media P01-F03-S01-0002.jpg from pete to object using expression "Filename without extension"
    P01-F03-S01-0002 (P01-F03-S01-0002): SUCCESS

  • edited August 15

    Hi, I'm not Seth by the way :smile: I'm just an end user as you but I thought it's good if the community could help out as well and not just the developers. So take my advice with some caution.

    I'm able to choose advanced options at the bottom of the media import UI. There you have the option of match on file name "where identifier starts with value". This works for me and I'm able to import multiple images to one object. I just tried it. I'm not sure though when this option was included so if you're on an older setup then mine maybe it's not there?

    EDIT: sorry, I clearly didn't read your post well enough. I see now that you already tried my suggestion. It works for me though.

  • Another idea. I think I have a memory of using another method a couple of years ago. Then I think I matched on directory instead of file name and just had a bunch of images named whatever in a folder with the corresponding idno. Maybe this could work as well?

  • There's a match-on-directory setting in the media importer under "advanced options" at the bottom of the form.

Sign In or Register to comment.