Quote from notweb on August 29, 2024, 12:51 amHi Friends,
I use this script to upload the photo selected by the user on the host in the desired path with the desired name. But unfortunately, it changes the size of the photo. I want the photo to be uploaded on the host with exactly the same original dimensions and not cropped or stretched.
fabLoadFile "npc_icon_preview" "logoImage" GetObjectInfo "npc_icon_preview" "width" [theWidth] ToNumber "[theWidth]" [theWidth] GetObjectInfo "npc_icon_preview" "height" [theHeight] ToNumber "[theHeight]" [theHeight] Wait 400 fabGetProperty "npc_icon_preview" "logoImage" "width" [imageWidth] fabGetProperty "npc_icon_preview" "logoImage" "height" [imageHeight] Math "[imageWidth]/[imageHeight]" -1 [imageRatio] Math "[theWidth]/[theHeight]" -1 [containerRatio] If [imageRatio] > [containerRatio] fabScaleToWidth "npc_icon_preview" "logoImage" [theWidth] Else fabScaleToHeight "npc_icon_preview" "logoImage" [theHeight] EndIf fabCenterObjectHorinzontal "npc_icon_preview" "logoImage" fabCenterObjectVertical "npc_icon_preview" "logoImage" EndWait Wait 1000 fabUnselect "npc_icon_preview" fabSaveAsBase64 "npc_icon_preview" [base64Data] wait 500 neoPhpSetPath "https://laminapp.com/Centrum/Apps/JAAAK/lkfORvhbc68vcqKL7kdTQ/tz4eAQSJSAcwBao7EjV5JT.php" neoPhpFileWriteFromBase64 "[npc_id]_icon.jpg" "[base64Data]" "" endwait EndWait
Hi Friends,
I use this script to upload the photo selected by the user on the host in the desired path with the desired name. But unfortunately, it changes the size of the photo. I want the photo to be uploaded on the host with exactly the same original dimensions and not cropped or stretched.
fabLoadFile "npc_icon_preview" "logoImage"
GetObjectInfo "npc_icon_preview" "width" [theWidth]
ToNumber "[theWidth]" [theWidth]
GetObjectInfo "npc_icon_preview" "height" [theHeight]
ToNumber "[theHeight]" [theHeight]
Wait 400
fabGetProperty "npc_icon_preview" "logoImage" "width" [imageWidth]
fabGetProperty "npc_icon_preview" "logoImage" "height" [imageHeight]
Math "[imageWidth]/[imageHeight]" -1 [imageRatio]
Math "[theWidth]/[theHeight]" -1 [containerRatio]
If [imageRatio] > [containerRatio]
fabScaleToWidth "npc_icon_preview" "logoImage" [theWidth]
Else
fabScaleToHeight "npc_icon_preview" "logoImage" [theHeight]
EndIf
fabCenterObjectHorinzontal "npc_icon_preview" "logoImage"
fabCenterObjectVertical "npc_icon_preview" "logoImage"
EndWait
Wait 1000
fabUnselect "npc_icon_preview"
fabSaveAsBase64 "npc_icon_preview" [base64Data]
wait 500
neoPhpSetPath "https://laminapp.com/Centrum/Apps/JAAAK/lkfORvhbc68vcqKL7kdTQ/tz4eAQSJSAcwBao7EjV5JT.php"
neoPhpFileWriteFromBase64 "[npc_id]_icon.jpg" "[base64Data]" ""
endwait
EndWait

Quote from luishp on August 30, 2024, 1:07 pm@notweb this topic has been discused several times in the forums.
There are many possible options. Easiest one is probably this free plugin.Regards.
@notweb this topic has been discused several times in the forums.
There are many possible options. Easiest one is probably this free plugin.
Regards.

Quote from luishp on August 31, 2024, 1:06 pm@notweb, please check this thread:
https://visualneo.com/forum/topic/upload-multi-image-by-user
@notweb, please check this thread:
https://visualneo.com/forum/topic/upload-multi-image-by-user