Wappler Version : 3.6.1
Operating System : Mac OS Big Sur
Server Model: Node JS
Database Type: Maria/MySQL
Hosting Type: Docker
Expected behavior
Implementing the resize element and set the width to 800pixels and the height to 'auto', uploaded images should scale proportionally.
Using hard coded values in both fields does work, but this deforms the uploaded image if the proportions differ.
After replacing the file, i restarted Wappler, redeployed, refreshed my browser, however on getting the folder listing now, before i even get to the crop, resize area, i get the following error
A little strange, its just returning null, no error but a null Preview.
If I disable the repeat after the Folder List then it shows the folder list, so i am just testing if it is the Load Image step causing the problem possibly
Resize is Width auto and height 1080
Crop is Center middle width: 1920, height: 1080
On a side not when testing with numbers in both fields, so without using auto then if i disable crop then resize works, and then disable resize and crop works, so it’s like they just do not work together.
I need to get more info about each image from my database so I add a repeat after the folder list, and get the data, then a load image step so i can get the image dimensions.
If a certain image i see while going through the list is too big or wrong proportions for what i want, i click a button that runs the server action to load image, resize, crop, and save back to the Docker volume,
On Success of crop, resize, save, it reloads server action 2 to get the folder listing again and show the new sizes.
Hope this makes sense.
Edit, it takes a while to test, because no matter what I do I can not get it to reload the cache, so I have to redeploy even without making changes so the cache refreshes and i can see the new sizes, although i have used refresh cache in the appconnect side when loading my server actions, so not sure why.
{status: “500”, message: “Expected positive integer for width but received NaN of type number”,…}
message: “Expected positive integer for width but received NaN of type number”
stack: “Error: Expected positive integer for width but received NaN of type number↵ at Object.invalidParameterError (/opt/node_app/node_modules/sharp/lib/is.js:101:10)↵ at Sharp.resize (/opt/node_app/node_modules/sharp/lib/resize.js:214:16)↵ at App.resize (/opt/node_app/lib/modules/image.js:176:21)↵ at App._exec (/opt/node_app/lib/core/app.js:427:57)↵ at App._exec (/opt/node_app/lib/core/app.js:398:28)↵ at async App.exec (/opt/node_app/lib/core/app.js:367:9)↵ at async App.define (/opt/node_app/lib/core/app.js:357:9)”
status: “500”