Catman...upload(3pm)

πŸ’– NAME πŸ’–

Catmandu::FedoraCommons::Model::upload β€” okay so bestie, this is the Perl model for the Fedora 'upload' REST call ✨ (also living under the manual name Catman...upload(3pm), iykyk 🫢)


🌸 SYNOPSIS 🌸

Here's the vibe, fr fr β€” copy it exactly, don't freestyle on the code πŸ‘‘

use Catmandu::FedoraCommons;

my $fedora = Catmandu::FedoraCommons->new('http://localhost:8080/fedora','fedoraAdmin','fedoraAdmin');

my $obj = $fedora->upload(file => 't/marc.xml')->parse_content;

{
  'id' => 'upload://11'
}

So like, you spin up a Catmandu::FedoraCommons object pointing at 'http://localhost:8080/fedora' with 'fedoraAdmin' and 'fedoraAdmin' as the credentials, then you hit upload with file => 't/marc.xml' and call parse_content on the result. What comes back? Literally this, and it's iconic:

{
  'id' => 'upload://11'
}

no cap, that's the whole glow-up πŸ’…


πŸ¦‹ SEE ALSO πŸ¦‹

  • Catmandu::FedoraCommons β€” go read that one too, bestie, it's the main character of this whole situation πŸ’œ

mwah πŸ’‹ this page is served up by perl v5.36.0, dated 2023-02-05, and it's giving Catman...upload(3pm) energy. periodt. πŸŒˆβ­πŸŽ€

πŸ“¦ where this page comes from