BUG: Zotero won't import all attachments from Zotero RDF/XML
                    Hi,
I am currently migrating my academic reading biography from a long-demised reference manager. I do so by generating Zotero RDF/XML from my existing data (the code can be found at https://github.com/tillgrallert/convert_tss-to-bibliographic-data) and have encountered a reproducible import bug: Zotero fails to import any files with a
Take for instance the following Zotero RDF/XML fragments:
The first attachment will import just fine. The second won't.
All the best,
Till
                            I am currently migrating my academic reading biography from a long-demised reference manager. I do so by generating Zotero RDF/XML from my existing data (the code can be found at https://github.com/tillgrallert/convert_tss-to-bibliographic-data) and have encountered a reproducible import bug: Zotero fails to import any files with a
# in their file names even if they are available on the file system.Take for instance the following Zotero RDF/XML fragments:
<z:Attachment xmlns:xs="http://www.w3.org/2001/XMLSchema"
                 rdf:about="#uuid_2841851E-BD71-49E4-9599-8470F051A30B">
  <z:itemType>attachment</z:itemType>
  <rdf:resource rdf:resource="/local/path/image.jpg"/>
  <dc:title/>
  <z:linkMode>2</z:linkMode>
</z:Attachment>
<z:Attachment xmlns:xs="http://www.w3.org/2001/XMLSchema"
             rdf:about="#uuid_7283E593-207F-41DB-A26E-5128C6FCE228">
  <z:itemType>attachment</z:itemType>
  <rdf:resource rdf:resource="/local/path/image #2.jpg"/>
  <dc:title/>
  <z:linkMode>2</z:linkMode>
</z:Attachment>
The first attachment will import just fine. The second won't.
# is allowed as part of an URI in @rdf:about. Hence, I deem this behaviour to be a bug.All the best,
Till
 Upgrade Storage
%23. The two URIs there aren't equivalent. In rdf:about it's a unique identifier, so using a fragment identifier for the current document is fine, but for rdf:resource, it's an actual file URI*, so if you keep the#then you're saying the file ends inimage.It looks like we're not properly using
%23when exporting to RDF, though, so we'll fix that.* I'm not sure about using an absolute path there, if that's what you're doing. As far as I know we only export relative paths, which are valid URIs. For an absolute path, I would think it would technically need to be a
file://URI, but it's possible we're accepting regular absolute paths too.#with%23, however, doesn't work. Zotero doesn't import the file regardless of whether one uses#or%23. Prefixingfile://doesn't influence this behaviour.I also ought to point out that this is not a Zotero export bug! The Zotero RDF/XML is of my own making to import references form another software.
#to%23. If you're on Windows, the path handling might be different.And I'm aware that this is your generated RDF. I'm just pointing out that we were also generating similarly incorrect RDF. We're working on a fix.