Skip to content

How to Save image locally - Form Component #150

Answered by lovasoa
Pieter3033 asked this question in Q&A
Discussion options

You must be logged in to vote

I have updated the code accordingly, but it still generates the same results

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 try sqlpage.exec('cmd', '/C', 'move', $file_path , 'C:\New') ?

SELECT sqlpage.exec('move', sqlpage.uploaded_file_path('Image') , 'C:\New' || $file_name);

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:

SELECT sqlpage.some_function('a' || 'b'); -- INCORRECT


SET $result = 'a' || 'b'
SELECT sqlpage.some_function($result); -- CORRECT

the value keeps writing in as NULL.

All sqlp…

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@lovasoa
Comment options

@Pieter3033
Comment options

@Pieter3033
Comment options

@lovasoa
Comment options

Answer selected by Pieter3033
@Pieter3033
Comment options

@Pieter3033
Comment options

@Pieter3033
Comment options

@lovasoa
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
functions Related to built-in sqlpage functions
2 participants