Skip to content

Commit

Permalink
feat: fix upload
Browse files Browse the repository at this point in the history
  • Loading branch information
xfl03 committed Nov 1, 2023
1 parent 6cb3730 commit c273dc3
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;

import java.io.File;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
Expand All @@ -29,6 +30,16 @@ public static void put(String key, Path file) {
storages.forEach(it -> it.put(key, file));
}

/**
* Put file to all storage.
*
* @param key key
* @param file file
*/
public static void put(String key, File file) {
put(key, file.toPath());
}

private static final Gson gson = new GsonBuilder().setPrettyPrinting().create();

/**
Expand Down

0 comments on commit c273dc3

Please sign in to comment.