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
- [SOLVED] Appwrite Cloud and FRA cloud se...
Can anyone estimate how long this will take to resolve? I am checking status here https://status.appwrite.online/
- How to use Operator.arrayAppend on a rel...
Hi, is it possible to use any operator on a relationship column? I have a One to Many relationship column on a table and I would like to add entries to the colu...
- Update user email using OTP
Hi, I am trying to implement email update using OTP, there is not password associated with the account. One solution I found online is creating appwrite functio...