mirror of
https://github.com/xfl03/MCCustomSkinLoader.git
synced 2026-11-19 16:29:36 +00:00
feat: fix upload
This commit is contained in:
1 parent
6cb37301b6
commit
c273dc396e
1 file changed
+11
@@ -3,6 +3,7 @@ package customskinloader.gradle.storage;
|
||||
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;
|
||||
@@ -29,6 +30,16 @@ public class StorageService {
|
||||
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();
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user