Page 1 of 1

Loading img from the file system not working...

Posted: Sat Nov 09, 2013 11:47 pm
by azadusman
Hi

I have dumped records into the BLC using bakend queries. Now i am to load images from the file system let us say /d:/<folder_name> ... I am expecting these images to be accessed in cmsstatic eg. localhost:8080/<webapp>/cmsstatic/<img.png> ... but i see it's not getting inserted in the temp foder.

When we read from the filesystem .. i am expecting it to be in cmsstatic variable so that i can plug these images into my inserted products( pushing products into system using insert logic)

here are the entries i put in common.shared.properties under code. Please help me to resolve this issue.

# Prefix used to indicate the url represents an asset being managed by the CMS.
asset.server.url.prefix.internal=cmsstatic
# When serving custom Pages or Structured Content fields, the url prefix defined
# above will be replaced with the string below. This is useful for sites
# that have a separate image domain or use a CDN to render images. This works well
# with CMS's that own the image part of your domain CNAME
#asset.server.url.prefix=http://localhost:8080/cmsstatic
asset.server.url.prefix=

# If left blank, the system will use the non secure url and replace the http with
# https.
asset.server.url.prefix.secure=

# prefix in front of all urls that hit your storefront from the admin. This is useful
# when the storefront is located on a different server from the admin (e.g. http://storefront:8080/)
store.front.webapp.prefix=http://localhost:8080/


# controls whether or not the AssetService stores (and retrieves) the binary asset from the filesystem or database
asset.use.filesystem.storage=true

# The base path where file system assets will be stored. Should begin but not end with a "/"
# If not set, the system will use System.setProperty("java.io.tmpdir")
asset.server.file.system.path=/broadleaf/asset/hot-sauces

# The system will check for assets in this directory before checking the file.system.path or database
# This field was primarily added to support needs like the demo site where we wish to provide
# assets as part of the distribution of the software.
#
# It is blank by default indicating to the system not to check this directory.
# The Broadleaf demo sites override this in development-shared.properties to allow for demo images to show in dev.
asset.server.file.classpath.directory=

# URLs for images and other assets will be stored efficiently on the filesystem using a set of
# generated directories based on the md5 value of the filename. The number below will be used
# to determine the number of directories created. 2 supports a distribution of about 10 million
# files and is suitable for most purposes. Upping to 3 would add support for over 2 billion. But
# for implementations of this size, distributed file system options should be considered.
asset.server.max.generated.file.system.directories=2

# The maximum file size that can be uploaded (10 Meg)
# Implementors should tune this according to their needs.
asset.server.max.uploadable.file.size=10000000

# The number of bytes from the input stream that will be read at a time
asset.server.file.buffer.size=8192

Re: Loading img from the file system not working...

Posted: Mon Nov 11, 2013 11:30 am
by phillipuniverse
Not really following you. Based on the properties that you have there. it appears that the assets should be saved to /broadleaf/asset/hot-sauces (asset.server.file.system.path).

Re: Loading img from the file system not working...

Posted: Sat Dec 28, 2013 8:40 pm
by azadusman
Thanks Philip.

We have resolved this issue by directly mapping img to media table. This issue is resolved.