uiowa / uiowa

The base application on Acquia Cloud for the University of Iowa.
11 stars 9 forks source link

SVG upload for BIMI #6786

Closed briand44 closed 11 months ago

briand44 commented 1 year ago

This would be for Tippie. Can’t upload .svg on her own to the media folder. Curious where the best/most reliable place for it to live is. It’s similar to favicon in that it should probably live some place that people can’t accidently remove. Conversely, it shouldn’t get removed via upgrades, etc…. and it only lives on .tippie.uiowa.edu. Is the default file upload location the best place for this, or should it live elsewhere?

First part: SVG currently isn't allowed. https://github.com/uiowa/uiowa/issues/130. Not sure if BIMI absolutely needs SVG? It's listed as such in https://www.litmus.com/blog/how-to-set-up-bimi/, but unsure if other formats would work.

In terms of where it should live, the public file directory probably has to be used, which is where it would go if it was simply uploaded. But we would probably want to add extra logic to prevent its deletion, path change, etc. (similar to how we prevent deletion of the home page and Iowa Now article type categories).

Also, it's my understanding that as long as the file is referenced by a media entity, it won't be cleaned up by our background processes, but should double check that, as it doesn't sound like the media will be used anywhere.

MO Update Looks like BIMI can be deployed on a per subdomain basis. My understanding is that we looked at turning it on for all of uiowa.edu previously but ran into issues as it would affect some mail services negatively (not sure what those were).

"Anything temporary or private will mean your subscribers won’t be able to see your logo next to your email in the inbox, defeating the purpose of BIMI"

Partially depends on if we're going to need to do this for multiple clients, or just Tippie.

Alternatively, a file upload not attached to media.

Proposed Solution

briand44 commented 1 year ago

Could this be as simple as SCP'ing the file into a specific location of the public files directory? Then it wouldn't be a managed file and we wouldn't have to worry about the path being changed, it being deleted, etc. Or do unmanaged files get cleaned up as well?

pyrello commented 11 months ago

Are there other sites that potentially need this eventually? If so, we might want to invest in building a config UI for it.

briand44 commented 11 months ago

Grooming Conversation... Get file from Tippie (Lydia) and find out if it needs to be in a specific location and manually add the file to a location within the public files directory and share the link with Tippie. In the future we may want to build more scaffolding around this if there is a larger use case.

cory-skeers commented 11 months ago

From my understanding, the BIMI stuff is limited to per email domain, so most campus partners will be limited to a campus-wide @uiowa.edu solution in the future, but Tippie is a unique case in they have a @tippie.uiowa.edu (unsure of the exact setup there) email that will sometimes be used in campaigns.

Likely this isn't needed to be repeatable, but a way to keep track of things with where the file is located for Tippie, and any possible campus-wide followups using the uiowa.edu domain.

briand44 commented 11 months ago

Reading through https://www.litmus.com/blog/how-to-set-up-bimi/ it doesn't seem like there is a specific location it needs to be, just somewhere publicly accessible.

The svg can be found https://iowa.sharepoint.com/sites/CSI-Drupal2/Shared%20Documents/Forms/AllItems.aspx?id=%2Fsites%2FCSI%2DDrupal2%2FShared%20Documents%2FTippie%2FBIMI&viewid=bf54b9d9%2D0975%2D4fbc%2D9f1b%2D6377bdc2307c

briand44 commented 11 months ago

needs grooming label still here until we size this.

briand44 commented 11 months ago

Tried this on dev first https://tippie.dev.drupal.uiowa.edu/sites/tippie.uiowa.edu/files/bimi/uiowa-logo.svg

Went ahead with prod https://tippie.uiowa.edu/sites/tippie.uiowa.edu/files/bimi/uiowa-logo.svg

briand44 commented 11 months ago

I emailed our partners at Tippie and let them know the link to the prod file.

briand44 commented 11 months ago

Sharing steps here in case they come in handy in the future.

I ssh'd into the server, created the directory and set permissions on the new directory. Then used scp to copy the file to the new location. I then updated permissions on the new file.

briand44 commented 11 months ago

Closing this, we can open a new issue if anything else comes up.