Hi all ,
Is there any way to upload pdf’s to thunkable .
I checked a few tutorials but couldnt understand what will be the upload preset though.
If not , if and when that component would be introduced would be very helpful.
a text input
which sets a pdf viewer'
's file
I cant understand what you meant . What i asked for was to be able to upload a pdf from the users side
so far in my knowledge you only can upload picture only. for file you need to think other way like java scrip or other external solution. it is frustration for me also.
The PDF Reader
accepts a URL so you can use this as an option.
Yes @muneer but what i want is for a user to be able to upload a pdf and i be able to show that.
Even Anything javascript would work
Check this
See the following post
Yes @muneer i checked that post and by that i was able to get the name of the pdf file. But what i want is to get the contents or something which i can show in the pdf viewer while viewing
If you are allowing the user to browse a certain server folder and select a name then all what you need to do is to make the full URL from the server path that you already know and the selected file and this URL should be the URL of the PDF Reader
component of Thunkable.
But I am not doing this. He/she can browse anywhere
You will have to deal with a security issue. All new browsers restricts the path of the file to reduce the risk of malicious acts.
You will need an additional library to read the actual path. File path is restricted in HTML and JavaScript and you need to add a library for that.
muneer,
so basically any file can upload to cloud storage? cloudinary for example?
Media DB can only upload image files but the Cloudinary API can upload any file.
you can try this:
MediaManager.get().upload(file).dispatch();
-
file(
string
) -
upload present(
public id
,folder
,context
,face coordinate
,custom coordinates
) -
signature(rest api calls)
-
use file name
to true( usepublic id
) -
folder
(contains data of thepublic id
) -
use file name
(file name forpublic id
)
1.resourse type
(type like video
,image
, auto
, raw
)
used more : visit docs
How to get the file string @vishruth-ram
So @muneer is there any of just transferring the file content?
or is there no way of doing so unless thunkable makes this component?
from the public id
@vishruth-ram i still cant understand.
@muneer i tried the cloudinary api and was able to upload my files, but how to get the url of that uploaded was not clear to me
what I was saying is docs of the cloudinary api
The API returns a JSON string which has the destination URL.