[Solved] I want to upload images to the server's path

How to block Thunkable X in order to get the same results as thunkable classic? !
In the past it was easier to do than this. By placing blocks like this

Seems like you’re trying to do several things in your blocks here @CHON3D

Based on the title of this post, are you just trying to set the path for the API component? The blocks are largely the same, no?

Thank you very much, @domhnallohanlon mhnall.
But I want to take the image from the image block up to my server to store, but there is no reference to which image to take from the block. And in which position to keep
Please help guide the direction once more as well.

Dear @domhnallohanlon
I have made an example of a blog that I have put in place by following this link.
https://x.thunkable.com/copy/f05eaabaa33fca96575431022de059b7

Including the PHP Code which is the data receiving side
file name : post_feedback.php

<?php $data = file_get_contents('php://input'); $dir = 'img_feedback/'; if (!(file_put_contents($dir.$_GET['fileName'],$data) === FALSE)) echo "File xfer completed."; // file could be empty, though else echo "File xfer failed."; ?>

Please check to see if there is a mistake. Where do I need to specify the content of the image? To allow it to be sent to the server

Hi,

I think that directly upload a local file on the server will not work, because the contents of the file can not be obtained in Thukable X. You can only get the local path for the file. But you might want to try an indirect way - upload the file using Media DB to store Cloudinary, and then use the provided URL to upload the file to the your server.

2 Likes

Thank you @actech
I will try using Media DB as you suggest. But however, I was hoping to get a way to upload images directly. Hopefully, in the future, Thunkable X will have a blog for uploading images. According to the desired path

Check it (for Cloudinary set params to your account)

https://x.thunkable.com/projects/5dc2829fd8b6db40cf624dcd/project/properties/designer/

3 Likes

Thank you @actech

2 Likes