How to Save image locally - Form Component #150
Answered
by
lovasoa
Pieter3033
asked this question in
Q&A
-
Hi, I am struggling to save a image locally. Configuration File: Code: select 'form' as component, 'Upload a new image' as title, 'upload.sql' as action;
select 'text' as type, 'Title' as name, true as required;
select 'text' as type, 'Description' as name;
select 'file' as type, 'Image' as name, 'image/*' as accept; set file_path = sqlpage.uploaded_file_path('Image');
select sqlpage.exec('mv', $file_path , 'C:\New'); |
Beta Was this translation helpful? Give feedback.
Answered by
lovasoa
Dec 12, 2023
Replies: 1 comment 8 replies
-
It looks like you are using windows. The https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/move |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sorry, I'm not familiar with windows. I think
move
is a built-in in cmd.exe and cannot be executed as an external program. Can you trysqlpage.exec('cmd', '/C', 'move', $file_path , 'C:\New')
?As stated in the error message, this is not supported. You need to do the concatenation separately and use just a variable name as a function parameter:
All sqlp…