Using Cloudinary
Hi guys using cloudinary but seems transformation is not working
const fetchPosts=useCallback(async()=>{
const { data:files } = await supabase
.from('category')
.select()
if(files && files.length>0){
const promises = files.map(async(file)=>{
const { data: { publicUrl } } = supabase.storage
.from('files')
.getPublicUrl(file.vname);
const myImage = new CloudinaryImage(publicUrl, {cloudName: 'cloudname'})
.resize(fill().width(100).height(200));
return {id:file.id, myImage:myImage};
});
const posts = await Promise.all(promises);
setDownload(posts);
console.log(posts)
}const fetchPosts=useCallback(async()=>{
const { data:files } = await supabase
.from('category')
.select()
if(files && files.length>0){
const promises = files.map(async(file)=>{
const { data: { publicUrl } } = supabase.storage
.from('files')
.getPublicUrl(file.vname);
const myImage = new CloudinaryImage(publicUrl, {cloudName: 'cloudname'})
.resize(fill().width(100).height(200));
return {id:file.id, myImage:myImage};
});
const posts = await Promise.all(promises);
setDownload(posts);
console.log(posts)
}

