|
|
@ -114,9 +114,9 @@ public class S3Service {
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
} catch (Exception e) {
|
|
|
|
} catch (Exception e) {
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
} finally {
|
|
|
|
} /*finally {
|
|
|
|
s3Client.close();
|
|
|
|
s3Client.close();
|
|
|
|
}
|
|
|
|
}*/
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -140,9 +140,9 @@ public class S3Service {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch (Exception e) {
|
|
|
|
} catch (Exception e) {
|
|
|
|
return -1;
|
|
|
|
return -1;
|
|
|
|
} finally {
|
|
|
|
} /*finally {
|
|
|
|
s3Client.close();
|
|
|
|
s3Client.close();
|
|
|
|
}
|
|
|
|
}*/
|
|
|
|
return 1;
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -170,9 +170,9 @@ public class S3Service {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch (Exception e) {
|
|
|
|
} catch (Exception e) {
|
|
|
|
return -1;
|
|
|
|
return -1;
|
|
|
|
} finally {
|
|
|
|
} /*finally {
|
|
|
|
s3Client.close();
|
|
|
|
s3Client.close();
|
|
|
|
}
|
|
|
|
}*/
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -195,9 +195,9 @@ public class S3Service {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch(Exception e) {
|
|
|
|
} catch(Exception e) {
|
|
|
|
return -1;
|
|
|
|
return -1;
|
|
|
|
} finally {
|
|
|
|
} /*finally {
|
|
|
|
s3Client.close();
|
|
|
|
s3Client.close();
|
|
|
|
}
|
|
|
|
}*/
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void uploadAvatar(String bucket, String key, byte[] buffer) {
|
|
|
|
public void uploadAvatar(String bucket, String key, byte[] buffer) {
|
|
|
|