Skip to content

Commit

Permalink
..
Browse files Browse the repository at this point in the history
  • Loading branch information
Wizzercn committed Dec 7, 2016
1 parent 3369268 commit fdccba3
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,12 @@ public Object addDo(@Param("code") String code,
throws IOException {
try {
String name = tf.getSubmittedFileName().substring(tf.getSubmittedFileName().indexOf(".")).toLowerCase();
byte[] buf = Streams.readBytesAndClose(tf.getInputStream());
String p = Globals.AppRoot;
String f = Globals.AppUploadPath + "/plugin/" + DateUtil.format(new Date(), "yyyyMMdd") + "/" + R.UU32() + name;
File file = new File(p + f);
Files.createFileIfNoExists(file);
Files.write(f, tf.getInputStream());
byte[] buf = Files.readBytes(file);
IPlugin plugin;
if (".jar".equals(name)) {
plugin = pluginMaster.buildFromJar(file, className, buf);
Expand Down

0 comments on commit fdccba3

Please sign in to comment.