Taifun
August 14, 2020, 7:18pm
#15
It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.
see also this example App Inventor Tutorials and Examples: Dropbox | Pura Vida Apps
To get an image of your blocks, right click in the Blocks Editor and select “Download Blocks as Image”. You might want to use an image editor to crop etc. if required. Then post it here in the community.
Taifun
TechyGuy
(AnonGuy)
August 17, 2020, 7:59pm
#16
@cedkim Please have a Look on this API.
Can you help me to implement this in Kodular
Rogerio_Rios
(Professional Support)
August 17, 2020, 8:39pm
#17
Friend, the steps are above. It is not an extension. Each API has its parameters. The Component Kodular web block has the POST and GET methods. Try to understand how each works.
TechyGuy
(AnonGuy)
August 17, 2020, 8:48pm
#18
Thanks Friend for Reply.
Yes I am Trying.
My Bad Habit everytime I do something and try but it dont work I do Delete all blocks.
If this is Done then we get Unlimited of Media Storage Issue Solved.
Can’t You Help Me, By Showing Block.?
Taifun
August 17, 2020, 9:29pm
#19
what about YOU showing your blocks, then we can suggest improvements?
Taifun
2 Likes
JaviR3TicS
(El Mundo Musical )
September 14, 2020, 7:52am
#20
First, you have to go to this link (client API)
https://docs.imagekit.io/api-reference/upload-file-api/client-side-file-upload
Then, with the Terminal Extension, try to execute this curl command:
curl -F file=@“YourFilePath” -F publicKey=YourApiKey -F signature=PrivateAPIKey -F expire=ExpireInSeconds -F token=YourToken -F fileName=YourFileName
REMEMBER TO CHANGE THE VALUES WITH YOUR DATA
1 Like
JaviR3TicS
(El Mundo Musical )
September 14, 2020, 7:58am
#22
Look at the previous post
TechyGuy
(AnonGuy)
September 14, 2020, 8:06am
#23
So first I need to host the client side code. then from there get the parameters then this curl will work ?
JaviR3TicS
(El Mundo Musical )
September 14, 2020, 8:29am
#24
You only need the client side I think. The server side is if you want to create your own server (I suppose, I don’t know how ImageKit works )
1 Like
TechyGuy
(AnonGuy)
September 14, 2020, 8:32am
#25
to run this I need token. so for getting token i need to host the client side code. Am I Right ?
JaviR3TicS
(El Mundo Musical )
September 14, 2020, 8:32am
#26
Let me investigate it for 5 minutes
TechyGuy
(AnonGuy)
September 14, 2020, 8:34am
#27
Ok. I will be thankful if you help me with this.
JaviR3TicS
(El Mundo Musical )
September 14, 2020, 8:37am
#28
Ok. The token is a string that you have to generate on the app. It’s like an identifier for each upload or request. So each token can’t be repeated
TechyGuy
(AnonGuy)
September 14, 2020, 8:39am
#29
Yes. token as well as expire too. so how do i generate both ?
JaviR3TicS
(El Mundo Musical )
September 14, 2020, 8:41am
#30
Try to generate the token using this:
You can use an additional web service, or an API:
https://www.uuidgenerator.net/
UUID is a universally unique identifier that is generated using a timestamp and the MAC address of the computer on which it was generated according to that service.
By this way, you don’t need to check if it is already on database. Just fetch data from that API.
Here is this api
TechyGuy
(AnonGuy)
September 14, 2020, 8:43am
#31
and how do i generate signature ?
JaviR3TicS
(El Mundo Musical )
September 14, 2020, 8:47am
#32
You have to get the text of this page. Each time you enter, it generate a different string
https://www.uuidgenerator.net/api/version1
TechyGuy
(AnonGuy)
September 14, 2020, 8:48am
#33
I figured out to manage token, signature, expiry.
now I am getting empty String. @JaviR3TicS