|
@@ -49,6 +49,19 @@ public class UpyunServiceImpl implements UpyunService {
|
|
|
return pathInfo;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public UpYunPathInfo writeFile(String siteId, UpyunPathEnvironmentInfo env, File file,
|
|
|
+ String md5) {
|
|
|
+ env.setTimeMillis(String.valueOf(System.currentTimeMillis()));
|
|
|
+
|
|
|
+ UpyunSite upyunSite = UpyunSiteManager.getUpyunSite(siteId);
|
|
|
+ UpYunClient upYunClient = UpyunSiteManager.getUpYunClientByUpyunId(upyunSite.getUpyunId());
|
|
|
+
|
|
|
+ String path = FreeMarkerUtil.process(upyunSite.getPath(), env);
|
|
|
+ UpYunPathInfo pathInfo = upYunClient.writeFile(path, file, md5);
|
|
|
+ return pathInfo;
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public void delete(String siteId, String filePath) {
|
|
|
|
|
@@ -59,7 +72,8 @@ public class UpyunServiceImpl implements UpyunService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public UpYunHttpRequest buildUpYunHttpRequest(String siteId, UpyunPathEnvironmentInfo env, String md5) {
|
|
|
+ public UpYunHttpRequest buildUpYunHttpRequest(String siteId, UpyunPathEnvironmentInfo env,
|
|
|
+ String md5) {
|
|
|
|
|
|
env.setTimeMillis(String.valueOf(System.currentTimeMillis()));
|
|
|
|