mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-08-23 16:12:34 +02:00
fix: remove public access from do space and generate signed url wherever PDF files are accessed
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import getPresignedUrl from './getSignedUrl.js';
|
||||
|
||||
async function UserAfterFind(request) {
|
||||
if (request.objects.length === 1) {
|
||||
if (request.objects) {
|
||||
const obj = request.objects[0];
|
||||
const ProfilePic = obj?.get('ProfilePic') && obj?.get('ProfilePic');
|
||||
|
||||
if (ProfilePic) {
|
||||
obj.set('ProfilePic', getPresignedUrl(ProfilePic));
|
||||
}
|
||||
|
||||
return [obj];
|
||||
}
|
||||
}
|
||||
}
|
||||
export default UserAfterFind;
|
||||
Reference in New Issue
Block a user