Quote from Andy Marshman on August 12, 2021, 4:36 pmHi,
Can neoPhpFileWrite write binary files to the server.
I have tried to capture the contents of a chosen file using a file input by using the following inside the change(files) event.
LocalBinaryFileToVar "FileInput1" [AppCVData]Later on after a button is clicked and some validation is done I use the following to upload the file. The file is set up as an alias in the config.php file with write permissions. It seems to work without any errors but the file on the server is unreadable.
neoPhpFileWrite "w_app_cv" "[AppCVData]" false "FileUpload"The response data passed to the FileUpload subroutine is True.
I have tested this with PDF files, DOCX and PNG, all with the same results.
Regards
Andy
Hi,
Can neoPhpFileWrite write binary files to the server.
I have tried to capture the contents of a chosen file using a file input by using the following inside the change(files) event.
LocalBinaryFileToVar "FileInput1" [AppCVData]
Later on after a button is clicked and some validation is done I use the following to upload the file. The file is set up as an alias in the config.php file with write permissions. It seems to work without any errors but the file on the server is unreadable.
neoPhpFileWrite "w_app_cv" "[AppCVData]" false "FileUpload"
The response data passed to the FileUpload subroutine is True.
I have tested this with PDF files, DOCX and PNG, all with the same results.
Regards
Andy

Quote from luishp on August 13, 2021, 10:05 am@andy-marshman no, what you want to do is not currently possible. Please use one of the thrid party file upload plugins instead:
File upload plugin from @palamar:
https://visualneo.com/forum/topic/plugin-para-subir-archivos-a-un-servidor-uploading-files-on-a-server-freeFile upload plugin from @emmanuel-fernandez:
https://visualneo.com/forum/topic/another-basic-file-upload-to-serverRegards.
@andy-marshman no, what you want to do is not currently possible. Please use one of the thrid party file upload plugins instead:
File upload plugin from @palamar:
https://visualneo.com/forum/topic/plugin-para-subir-archivos-a-un-servidor-uploading-files-on-a-server-free
File upload plugin from @emmanuel-fernandez:
https://visualneo.com/forum/topic/another-basic-file-upload-to-server
Regards.
Quote from Andy Marshman on August 13, 2021, 10:23 am@luishp I have looked at the all the plugins on the forum and don't think they will help me.
Here is what I am currently doing: -
I have a combination of fields on a page, textinput, textarea, radio buttons, check boxes, date fields etc. I also have two file input buttons for the user to upload two specific types of files.
The data is first sent to the database on the server using neoPhpExecSql, if this was successful, I then get back a unique ID to rename the file to. Only then do I want to upload the files. These files are sent using neoPhpFileWrite
I also have an invisible form on the page that I'm using to send the filenames of the chosen files to the server using the HttpRequest plugin and shf_SendForm to send it. The php on the server then renames and moves the file that was uploaded.
This all works perfectly if the file is text but not if the file is binary.
Can you think of a way to do this? Do you know if it is possible to send the files using HttpRequest if I maybe add them to the form?
Regards
Andy
@luishp I have looked at the all the plugins on the forum and don't think they will help me.
Here is what I am currently doing: -
I have a combination of fields on a page, textinput, textarea, radio buttons, check boxes, date fields etc. I also have two file input buttons for the user to upload two specific types of files.
The data is first sent to the database on the server using neoPhpExecSql, if this was successful, I then get back a unique ID to rename the file to. Only then do I want to upload the files. These files are sent using neoPhpFileWrite
I also have an invisible form on the page that I'm using to send the filenames of the chosen files to the server using the HttpRequest plugin and shf_SendForm to send it. The php on the server then renames and moves the file that was uploaded.
This all works perfectly if the file is text but not if the file is binary.
Can you think of a way to do this? Do you know if it is possible to send the files using HttpRequest if I maybe add them to the form?
Regards
Andy
Quote from Andy Marshman on August 13, 2021, 10:35 am@luishp It's okay, having thought about what I had just written in my response it should work using the HttpRequest plugin.
I will come back if I can not get it working.
Regards
Andy
@luishp It's okay, having thought about what I had just written in my response it should work using the HttpRequest plugin.
I will come back if I can not get it working.
Regards
Andy