Site-specific File Sideload

I originally asked this as part of the question here, but since nobody answered, I’m guessing either a) the question didn’t make sense, or b) the answer is so obvious, people can’t believe I asked that. So let’s break it apart and ask in a different way.

Could I make a Site-specific File Sideload Module by copying the original File Sideload, making a new namespace, and changing anything that says ‘Omeka\Settings’ to ‘Omeka’siteSettings’ (specific places listed below)?

namespace FileSideload changed to SiteFileSideload
→ SiteFileSideload /

  • module.php
    • lines 26, 44, 58, 87
      • ‘Omeka\Settings’ changed to ‘Omeka\siteSettings’
  • src / Service / MediaIngesterSideloadDirFactory.php
    • line 13
      • 'Omeka\Settings\ changed to ‘Omeka\siteSettings’
  • src / Service / MediaIngesterSideloadFactory.php
    • line 12
      • 'Omeka\Settings\ changed to ‘Omeka\siteSettings’

Since it’s a new namespace, would I need to change anything else? (And I planned on including the “parent” in the .ini file, just to make sure credit was given where due.)

Hi @megtrip3 ,

I personally think this is a little overkill and I don’t think it will work like you think it might. But I could totally be wrong.

Going back to your original question. Yes, it is possible to have multiple directories located within your specified sideload directory.

There are a couple of examples in the docs (File Sideload - Omeka S User Manual) for adding individual files or a whole subdirectory of files.

If you are doing a CSV import, you should just be able to include the full relative path where the file is located in your sideload directory.

Thank you. I read the “Readme”, but forgot to check the User Manual to see if it had more information on File Sideload. (I’ve been digging into module and theme guts too much, so the User Manual slipped my mind.)

So yes, my idea is overkill since the functionality is already there.

Now if only we could combine it with the Asset panel functionality to not only give a thumbnail of the file, but to also add Alt Text and possibly edit the file name. Adding it to the admin panel would also be handy.

I still think making a site-specific sideload directory might also be beneficial, but I guess you could do that in a sub-directory.

@megtrip3 , I think it could be interesting, I just wonder if it’s possible. It doesn’t seem that Media attaching is done in the context of a Site and the Item itself could belong on more than one site.

1 Like

I’m not looking to use it for media on items (except for maybe special placeholder thumbnails). Mostly this is to help keep my assets organized. I like to offer a wide variety of color options in things like logos and buttons and backgrounds and whatnot, so it can quickly fill up the global asset panel, when what I really need is a site-specific option for things that are only going to be used on that particular site.

I like how some settings are on both the “Settings” (Global Settings) and “Site Settings” menu. Global image assets might include my logo, team member pictures, sponsor logos, etc.–anything that would be used across all sites on a hub. Site-specific image assets would be that site/project’s logo, matching theme elements (like background graphics or page dividers), and banners. (I also have a site with a bunch of videos that are currently stored on Youtube, but as long as it didn’t affect load time, this could also give a good storage place for those videos.)

I’ve been playing with File Sideload and the File Manager part of Easy Admin, and am finding it a bit confusing (or at least contrary to what I expect). After having uploaded a folder/directory, I click “display folders” and it doesn’t do anything unless I added the folder myself in cPanel. For those folders that I added in cPanel, I don’t have an option of moving uploaded files into or out of them, or even to see what their contents are.
image

Also, here, it says


But when uploading–either a file or directory/folder–there is not the option of putting in the configured directory for those modules, or an existing subdirectory–it just puts it in the configured directory for Easy Admin (default “/files/preload”). Do I need to change the configured directory each time?

I want to dig into/experiment with some of the other modules that are similar or have similar elements, like Alt Text, Local Media Ingester, Archive Repertory, Bulk Import, and Timeline and compare them to how the asset panel is set up. Who knows, maybe I’ll be able to figure something out?

If I wanted to suggest these extensions/additions, where would be the best place? On Omeka’s Github? Here on the forum?