i uploaded pdf same as i did with uplaoding images and now i wanna fetch it and display it but i only have the link of that file which is - $APPWRITE_ENDPOINTS/storage/buckets/$APPWRITE_FILES_BUCKET/files/$fileId/view?project=$APPWRITE_PROJECT_ID&mode=admin
And what's the issue?
I mean how can i display that pdf file
I tried using a pdfview package but it needs filepath which is just showing blank screen if i am providing the link to that filepath
Have you tried using the Get File for Download
instead of the Get File for View
method?
Isnβt there any way so that the user can see the file before downloading it
Viewing and Downloading is basically the same thing. Even in Appwrite, the only difference difference is that when you use download
, the response comes with a Content-Disposition: attachment
header, which instructs the browser to download the file
Okay i will try to do that
Mind if I ask which package you're using for the pdf?
flutterpdfview
i am providing link to PDFView CarouselSlider(
items: fileLinks.map((link) {
return Container(
width: MediaQuery.of(context).size.width,
margin: const EdgeInsets.all(10),
child: PDFView(
filePath: link,
),
);
}).toList(),
options: CarouselOptions(height: 400, enableInfiniteScroll: false),
);
and i am sure that there is nothing wrong with the link
btw it's best to use 3 backticks for multi line code
There's not much else on the Appwrite side for this. If your library requires a file path, you must download and supply a file path
Recommended threads
- Current User is Not authorized
recreating same Thread
- Apple OAuth Scopes
Hi Hi, I've configured sign in with apple and this is the response i'm getting from apple once i've signed in. I cant find anywhere I set scopes. I remember se...
- Sign In With Apple OAuth Help
Hi All! I've got a flutter & appwrite app which Im trying to use sign in with apple for. I already have sign in with google working and the function is the sam...