I’ve been following the latest tutorial videos from the wonderful @Hyperbytes that deal with image uploads and processing.
Using a Wappler Local Server/NodeJS setup, I found that although the image uploaded and appeared in the correct folder on my computer, the part of the tutorial where the path was written to the database wasn’t working. And, interestingly (or not), the ‘url’ field in the output was blank.
So the Image Upload would produce output like this:
{
"upload": {
"name": "example.png",
"path": "public/userdata/2/example.png",
"url": "",
"type": "image/png",
"size": 40285
},
"insert": {
"affected": 1,
"identity": 36
}
}
And although the other information would update the database, for example the identifier of the user who uploaded the photo, the column for image path remained blank.
I tried lots of trial and error, creating different Set Values with output and setting them to various different parts of the API to try and get some information (eg upload.path, upload.name, post.image.name etc etc), basically using my own ignorance to cast a wide net to try and get somewhere. None of these produced anything in the console, despite output being selected.
A little later with no luck I pushed my changes to git and went about my day. Later, on a different computer, I decided to clone the project and have another go… and this time it worked as it should. No changes were made, it just worked.
Not wanting to rock the boat, I tidied up the mess I had previously made with all the extra Set Values and pushed it back.
Now back at the original computer I have pulled the ‘working’ version and the original behavior has returned and it is not working.
So my question is: what could be wrong/funny/different about Computer A which is stopping this process from working properly? Anything I can do to diagnose and change?
Thanks in advance. And please consider in your response that you’re talking to someone who followed an excellent step by step tutorial and still didn’t get it working!