use of com.pratilipi.data.type.BlobEntry in project pratilipi by Pratilipi.
the class EventDataUtil method getEventBanner.
public static BlobEntry getEventBanner(Long eventId, Integer width) throws UnexpectedServerException {
String fileName = BANNER_FOLDER + "/" + eventId;
BlobEntry blobEntry = DataAccessorFactory.getBlobAccessor().getBlob(fileName);
if (width != null)
blobEntry.setData(ImageUtil.resize(blobEntry.getData(), width));
return blobEntry;
}
use of com.pratilipi.data.type.BlobEntry in project pratilipi by Pratilipi.
the class AuthorImageApi method post.
@Post
public GenericResponse post(PostRequest request) throws InvalidArgumentException, InsufficientAccessException, UnexpectedServerException {
BlobEntry blobEntry = DataAccessorFactory.getBlobAccessor().newBlob(request.getName());
blobEntry.setData(request.getData());
blobEntry.setMimeType(request.getMimeType());
blobEntry.setMetaName(request.getName());
String profileImageUrl = AuthorDataUtil.saveAuthorImage(request.authorId, blobEntry);
return new Response(profileImageUrl);
}
use of com.pratilipi.data.type.BlobEntry in project pratilipi by Pratilipi.
the class PratilipiContentImageApi method post.
@Post
public PostResponse post(PostRequest request) throws InvalidArgumentException, InsufficientAccessException, UnexpectedServerException {
BlobEntry blobEntry = DataAccessorFactory.getBlobAccessor().newBlob(request.getName());
blobEntry.setData(request.getData());
blobEntry.setMimeType(request.getMimeType());
blobEntry.setMetaName(request.getName());
String imageName = PratilipiDocUtil.saveContentImage(request.pratilipiId, blobEntry);
return new PostResponse(imageName);
}
use of com.pratilipi.data.type.BlobEntry in project pratilipi by Pratilipi.
the class PratilipiCoverApi method post.
@Post
public PostResponse post(PostRequest request) throws InvalidArgumentException, InsufficientAccessException, UnexpectedServerException {
BlobEntry blobEntry = DataAccessorFactory.getBlobAccessor().newBlob(request.getName());
blobEntry.setData(request.getData());
blobEntry.setMimeType(request.getMimeType());
blobEntry.setMetaName(request.getName());
String coverImageUrl = PratilipiDataUtil.savePratilipiCover(request.pratilipiId, blobEntry);
return new PostResponse(coverImageUrl);
}
use of com.pratilipi.data.type.BlobEntry in project pratilipi by Pratilipi.
the class EventBannerApi method post.
@Post
public GenericResponse post(PostRequest request) throws InsufficientAccessException, UnexpectedServerException {
BlobEntry blobEntry = DataAccessorFactory.getBlobAccessor().newBlob(request.getName());
blobEntry.setData(request.getData());
blobEntry.setMimeType(request.getMimeType());
EventDataUtil.saveEventBanner(request.eventId, blobEntry);
return new GenericResponse();
}
Aggregations