Merge pull request #282 from Kitzanos/s3-file-issue-prod
Cherry-pick (Resolved S3 file issue)
This commit is contained in:
@@ -291,11 +291,14 @@ public class Utils {
|
|||||||
return pattern.matcher(email).matches();
|
return pattern.matcher(email).matches();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// public static String randomKey(Integer range) {
|
||||||
|
// String data = String.valueOf(System.currentTimeMillis());
|
||||||
|
// return data.substring(data.length() - range);
|
||||||
|
//
|
||||||
|
// }
|
||||||
public static String randomKey(Integer range) {
|
public static String randomKey(Integer range) {
|
||||||
String data = String.valueOf(System.currentTimeMillis());
|
return UUID.randomUUID().toString().replace("-", "").substring(0, range);
|
||||||
return data.substring(data.length() - range);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String convertObjectToJsonString(Object object) {
|
public static String convertObjectToJsonString(Object object) {
|
||||||
try {
|
try {
|
||||||
// Check if the object is a string
|
// Check if the object is a string
|
||||||
|
|||||||
Reference in New Issue
Block a user