Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

See also How are Images represented in the Model?, Access images after changing the default namespace

The uploaded image files are identified by a combination of URI and filename. The URI is used as the principal identifier so we don't need to worry about collisions if two people each upload an image named "image.jpg". The filename is retained so the user can use their browser to download their image from the system and it will be named as they expect it to be.

...

Note

In this example, we assume that VIVO's home directory is at /usr/local/vivo. This depends on the value of vitro.home in the build.properties file, and may be different for your installation.

We want to turn the URI into the directory path, but the URI contains prohibited characters. Using a PairTree-like character substitution, we might store it at this path:

...

By the way, almost all of this is implemented in edu.cornell.mannlib.vitro.webapp.filestorage.backend.FileStorageHelper
and illustrated in
edu.cornell.mannlib.vitro.webapp.filestorage.backend.FileStorageHelperTest

...

From a http://sourceforge.net/mailarchive/message.php?msg_id=26671929 message),] in the vivo-dev-all archive, by Jim Blake, dated 2010-11-29 18:56