Thanks again Sandeep, I’ve found this System console as well, where I could test my logic, and make it work the way I needed it to work.
But now I’ve gone into a new problem, that I need to send an Image file itself, to an endpoint as a data, but from Server Script I can’t use “open()” method from Python, to read the image and then send it as an Image.
Perhaps, Would you know any other methods that I could use to solve my problem, any tips? haha
In server scripts, imports are disabled for security reasons. So for this you have to code this in your app.
There is one method which you can use, but it returns the bytes string of the file, for which you need to create a function on the other server to convert it back to image. Below is the example code.
I could solve that returning the base64 string, but I had to overwrite a method in frappe, that wasn’t working properly, the method in frappe.utils.image_to_base64().
Then I could make it work, and get the base64, I tried your way there but didn’t succeed, maybe I’ve used the wrong file_name haha.