Class is not used to separate keyspace, domain is. All class does is allow you to tell mogilefs how many replicas of the file you want stored. To do what you are trying you would want an "original" domain and then a "cropped" domain, etc and store your files that way using the same key. But I have to agree with Clinton in that you should really just append that extra bit of information to the keyname so everything is under one domain.
On Wed, Mar 26, 2008 at 10:19 AM, Clinton Goudie-Nice < [EMAIL PROTECTED]> wrote: > Greetings Bhavin, > > I dont believe MogileFS is designed to allow you to have multiple files > with the same key. > > In our application we're not exposing the key in any way to the user, and > in fact our key is database ID from another DB, not the file's name. We > maintain all the meta information about the file, including the filename, in > another database entirely. > > For simplicity, you might try naming your files somefilename*master > somefilename*cropped somefilename*croppedsmaller or some other common naming > convention, and then conceal that logic from the end user in your > application. > > Hope this helps! > > Clint > > > [image: Twelve Horses] <http://web.twelvehorses.com/> [image: > Mobile] <http://web.twelvehorses.com/info_center/whitepaper/> [image: > Social] <http://web.twelvehorses.com/solutions/blogging_for_business/> > [image: > Web] <http://web.twelvehorses.com/solutions/website_design/> [image: > Email] <http://web.twelvehorses.com/technology/> > *Clinton Goudie-Nice* > Architect / Senior Software Engineer > [EMAIL PROTECTED] > Phone: +1.801.571.2665 ext 3264 Mobile: +1.801.915.0629 Fax: > +1.801.571.2669 LinkedIn: http://www.linkedin.com/in/cgoudie > *Twelve Horses* > 13961 Minuteman Drive > Suite 125 > Draper, UT 84020 > *www.twelvehorses.com* > > On Wed, 2008-03-26 at 11:20 +0530, Bhavin Shah wrote: > > Hello, > > > > I am working on Mogile FS for the first time. I have a issue that I > wanted to store photos with the original and crop ones with different > classes and but onto the same domain. > > > > Issue is that I wanted to keep same key for a image and its crop ones also > with different classes. But using the getPath I have to pass only the key, > so how will mogFS class will know that, which image I wanted, means the crop > one or the original one. Is there any way that I can pass the class also in > getPath function. > > > > > > Thanks and Regards > > Bhavin Shah. > > > >
