
Sorry everyone but I got a problem SERVICE
return this.storage.getFilePreview(
conf.appwriteBucketId,
fileId
)
}```
**Not working in my post form**
``` {post && (
<div className='w-full mb-4'>
<img
src={appwriteService.getFilePreview(post.blogImage)}
alt={post.title}
className='rounded-lg'
/>
</div>
)}```
**Not working in my Home page**
``` <div>
{!blogImage? null: <div>
<img src={appwriteService.getFilePreview(blogImage)} alt={title}/>
</div> }
<div'>
<div>{title}</div>
</div>
</div>```
**Not working in my blog page**(When I visit blog page it says missing parameter 'fileId')
```<img
src={appwriteService.getFilePreview(post.blogImage)}
alt={post.title}
className='rounded-xl'
/>```

This is where I assign fileId
try {
const file = await appwriteService.uploadFile(data.image[0]);
if (file) {
const fileId = file.$id
data.blogImage = fileId
console.log(`blogImage`, fileId)
const dbPost = await appwriteService.createPost({
...data,
userId: userData.$id})
if (dbPost) {
navigate('/profile')
}
}
} catch (error) {
console.log(`ERROR POSTING `, error)
}
}```

Please help

Did you try logging fileId
before passing it into storage.getFilePreview()
?

As with everything, troubleshoot by working your way back, making sure inputs/outputs/variables are what you expect them to be

Yes I did and it shows correct data

But you're getting an error saying fileId is missing?

react-router-dom.js?v=de89454e:3534 React Router caught the following error during render AppwriteException: Missing required parameter: "fileId" at Storage.getFilePreview (http://localhost:5173/node_modules/.vite/deps/appwrite.js?v=de89454e:2929:13) at AppwriteService.getFilePreview (http://localhost:5173/@fs/C:/Users/User/Desktop/bloghub/blogHub/src/backend/config.js?t=1711323347785:151:29) at Blog (http://localhost:5173/@fs/C:/Users/User/Desktop/bloghub/blogHub/src/pages/Blog.jsx?t=1711323347785:56:32) at renderWithHooks (http://localhost:5173/node_modules/.vite/deps/chunk-SHEUFWB5.js?v=de89454e:12171:26) at mountIndeterminateComponent (http://localhost:5173/node_modules/.vite/deps/chunk-SHEUFWB5.js?v=de89454e:14921:21) at beginWork (http://localhost:5173/node_modules/.vite/deps/chunk-SHEUFWB5.js?v=de89454e:15902:22) at beginWork$1 (http://localhost:5173/node_modules/.vite/deps/chunk-SHEUFWB5.js?v=de89454e:19749:22) at performUnitOfWork (http://localhost:5173/node_modules/.vite/deps/chunk-SHEUFWB5.js?v=de89454e:19194:20) at workLoopSync (http://localhost:5173/node_modules/.vite/deps/chunk-SHEUFWB5.js?v=de89454e:19133:13) at renderRootSync (http://localhost:5173/node_modules/.vite/deps/chunk-SHEUFWB5.js?v=de89454e:19112:15) Object

yes

Also, instead of saying something is not working, it's better to be explicit and say what is going on

sure

AppwriteException: Missing required parameter: "fileId"

In my home page I am not getting any error but I cannot preview the image same case with post form page but in my blog page it is showing that AppwriteException: Missing required parameter: "fileId"

Sounds like you have two different problems

yes

Focus on the file id error in this support thread

For your other one, search support for similar problems and 3rd party cookies

sure
Recommended threads
- Microsoft Oauth2 gets auto disabled
I'm runnin appwrite self hosted 1.7.4 and once every few hours the provider keeps getting disabled for whatever reason. I don't see anything in the logs and wo...
- Site Git deployment bug
I am facing issue when trying to create a site and deploy it into git, see attached video: ```json { "message": "When connecting to VCS (Version Control Sy...
- `http://` callback URIs
Hiya. I'm a little inexperienced with SSL and HTTPS, so I'm not sure if what I've been trying does anything. My redirect URIs for my OAuth providers are all HT...
