[Clipart] upload ist failing

Bryce Harrington bryce at bryceharrington.com
Fri Jul 22 21:45:11 PDT 2005

On Fri, Jul 22, 2005 at 11:15:46PM -0400, Jonadab the Unsightly One wrote:
> Bryce Harrington <bryce at bryceharrington.com> writes:
> > > 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.
> > 
> > Interesting, I took this approach with DMS; 
> Which, embedding the metadata, or keeping it separate?

Keeping it separate.

> > sounds like we should stick with this mechanism in general.  
> Well, I *think* most of the bugs are worked out now, except for a
> charset handling issue in the upload script.  
> But if we'd gone with the separate-metadata-file approach, it would
> have saved us several significant bugs over the last few months:  the
> one where the regular expression ate too much, the one where the
> regular expression didn't insert the metadata if the root element
> wasn't called svg, and the one where the files were written empty.
> Plus two other bugs (a charset bug and the one where encode_entities
> encoded too much) would only have impacted the metadata, leaving the
> SVG files usable, but because the metadata was embedded the SVG files
> were broken too.
> Live and learn.


> > I think we could do a "late binding" of the metadata, keeping the
> > original svg around as submitted.  That way if the metadata update
> > scripts fail, we can go back to the source and resolve it.
> Hmmm...  so, do you mean that the upload script would check in the SVG
> as it stands when the user submits it to the DMS and then also set
> metadata for it, as a separate step, and then the release process
> could pull both the SVG and the metadata for it from the DMS and
> then combine them at that point?

Essentially, yes.  Actually, it would be a bit simpler.  DMS already
takes care of extraction (and management) of the metadata, so the upload
script would only need to do the following:

  1.  Insert the file into dms (metadata is auto-extracted)
  2.  (Optionally) Update any parameters as desired

For download, I suppose DMS should probably provide a way to retrieve
the svg with the correct metadata inserted, plus some way to
alternatively get the original version.


More information about the clipart mailing list