I am trying to upload a batch of files, then check if the files already exist, and if they do not exist, then move the image to its correct folder, and do some image processing, like resize, etc.
The problem I am having is that, every step after the FileMove step just seems to not work as expected.
The FileMove seems to have no schema that I can see, and all bindings like name, path etc. work perfectly in a setValue step if above FileMove, however if I drag the same setValue step to after, then it produces no result at all.
Update: Even if my setValue step after the FileMove is static text, it will not output it. Also the FileCopy seems to do the exact same thing. I am beginning to rather think its the If File Exists rather than what steps are inside it.
After many hours of messing around with this, I think it is the If File Exists step, its like the step only returns true or false, so if I ignore the then>steps and else>steps and just leave them empty, and ensure the If File Exists is set to output the result, I can then run a condition on the If File Exists step and insert all my then, else steps inside that.
checks each file name against the main directory, to make sure of no duplicates
if there is a duplicate, send the filename to the user and remove the uploaded temp file
if not duplicate, move the file to the main directory
load the moved file, resize and save a smaller version to a thumbnails directory, keeping the original
get image size of full size image
get exif data of full size image
if exif data exists, query the database to check if the photographers name already exists
if photographer exists, insert image data only to database, and the foreign key of the photographer
if photographer not exists, insert photographer, then insert image data and photographer insert id
else of step 7. No exif data exists, just insert image data, without photographer data.
All working perfectly now, so maybe if this is the intended way to work with this, Wappler could remove the then>steps, else>steps from the Server Connect UI so it is clearer that we are just getting the output?
Also there was no output of the fileMove step when i described this in the first post, however after I used it in the condition, there is indeed and output of the full file destination path, which is perfect. Would be nice if there were name, path, url, type, size schema on the fileMove like there is for the upload step.