The File Name setting should not include the file extension, this will be taken from the uploaded file, or if the form is being converted for images, from the selected format settings.
in this case it looks like you are converting web images to .jpg
in the file name, setting use str_replace to strip the .jpg extension from the value of the hidden element:
change:
'FileName' => "".((isset($_POST["currentImage"]))?$_POST["currentImage"]:"") ."",
to:
'FileName' => "".((isset($_POST["currentImage"]))?str_replace(".jpg","",$_POST["currentImage"]):"") ."",