{
protected static String imageHost = MirConfig.getProp("Producer.Image.Host");
protected static String imageRoot = MirConfig.getProp("Producer.ImageRoot");
- protected static Logfile theLog = Logfile.getInstance(MirConfig.getProp("Home")+
+ protected static Logfile theLog = Logfile.getInstance(
+ MirConfig.getProp("Home")+
"log/media.log");
+ private final String sepChar = File.separator;
+
public void set (InputStream in, Entity ent, Entity mediaTypeEnt )
throws MirMediaException {
String date = ent.getValue("date");
String datePath = StringUtil.webdbDate2path(date);
try {
- long size = FileUtil.write(getStoragePath()+"/"+datePath+"/"+
- mediaFname, in);
- ent.setValueForProperty("publish_path",datePath+"/"+mediaFname);
+ long size = FileUtil.write(getStoragePath()+sepChar+datePath+
+ sepChar+mediaFname, in);
+ ent.setValueForProperty("publish_path",datePath+sepChar+mediaFname);
ent.setValueForProperty("size", new Long(size).toString());
ent.update();
} catch (Exception e) {