[Clipart] upload ist failing
Jonadab the Unsightly One
jonadab at bright.net
Fri Jul 22 18:21:02 PDT 2005
"Jonadab the Unsightly One" <jonadab at bright.net> writes:
> Hmm... How are the 0.0 K ones different from the others?
>
> I have a hunch about this, but I'm going to have to look at the upload
> log to be sure -- the new log, from *since* the Metadata.pm upgrade.
> I'm scp'ing that down to my workstation now.
Hunch confirmed: all of the files that are 0.0 K were submitted
without embedded metadata in the SVG, except for one which had
Illustrator metadata[1]. What's happening is that to_svg() is failing
(returning undef, which I forgot to check for; always check for
failure: bad programmer, no cookie) any time that parse() fails,
e.g., if the svg as submitted does not contain the metadata we are
looking for. That is to say, the upload script is suffering from
not being able to correctly handle exactly the same case that I
already knew the repair script can't handle, but in the repair script
I just counted it as a missing feature; here, it's a bug.
What we *should* do in this case is insert the metadata that are
specified at upload time, but for that to happen, the parse has to
return a working object with the XML attached, so that to_svg can do
its thing later after the fields are set.
I will have to add an option to sub parse for this, since it's not the
behavior you would expect most calling code to want. Shouldn't be
hard; I *may* even be able to get it working tomorrow.
As far as the files that have been submitted that are 0.0 K in
incoming, I should be able to recover them from the upload log,
hopefully, once I get the upload script repaired.
Man, if I knew last October what I know now, I would have said that
embedding the metadata in the actual SVG images would be a lot of
trouble and bug-prone and that we should use separate .rdf files like
we have to do anyway for all the non-XML filetypes.
---
[1] Illustrator metadata contains create and modify dates and
sometimes thumbnails and things, but not the author and title
fields we are looking for, so the metadata parse fails.
--
Open Clip Art Library: Drawing Together
http://www.openclipart.org/
More information about the clipart
mailing list