-
Hi Team, Using file field type when i upload a file the name is getting modified. instead i wanted the file name to be preserved also i wanted to generate a drop down which list all the files in certain directory. Will it be possible to get that using Ansible forms? Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 1 reply
-
or any expressions would just do a rename with executing playbook |
Beta Was this translation helpful? Give feedback.
-
That's correct, the file is uploaded under a temp filename, but extravars are sent with the original name so that you can move/copy/rename the file in ansible. So you can rename it back to the original name. |
Beta Was this translation helpful? Give feedback.
-
Regarding the dropdown, there is a remote expression fn.fnSsh that allows you to ssh to a machine, run a command, and parse the output, you can do an "ls" to get the list of files. |
Beta Was this translation helpful? Give feedback.
-
But I want this to be done with out using playbook or manual
Any expressions support this for renaming the file immediately after upload
…On Wed, 10 Jan 2024 at 2:45 PM, vcmirko ***@***.***> wrote:
Hi Team,
Using file field type when i upload a file the name is getting modified.
instead i wanted the file name to be preserved
also i wanted to generate a drop down which list all the files in certain
directory. Will it be possible to get that using Ansible forms?
Thanks,
That's correct, the file is uploaded under a temp filename, but extravars
are sent with the original name so that you can move/copy/rename the file
in ansible. So you can rename it back to the original name.
—
Reply to this email directly, view it on GitHub
<#133 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BCAEUMD6TO5DJHZRU6HGGRLYNZL2PAVCNFSM6AAAAABBUEMZ3OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBUGQ3DAMJXHE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Where can I find the list of functions available
…On Wed, 10 Jan 2024 at 2:46 PM, vcmirko ***@***.***> wrote:
Hi Team,
Using file field type when i upload a file the name is getting modified.
instead i wanted the file name to be preserved
also i wanted to generate a drop down which list all the files in certain
directory. Will it be possible to get that using Ansible forms?
Thanks,
Regarding the dropdown, there is a remote expression fn.fnSsh that allows
you to ssh to a machine, run a command, and parse the output, you can do an
"ls" to get the list of files.
—
Reply to this email directly, view it on GitHub
<#133 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BCAEUMD5GQN6XZHR47WJOXTYNZL7NAVCNFSM6AAAAABBUEMZ3OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBUGQ3DEMZWGQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
https://ansibleforms.com/expressions/#remote-expressions also consider using discussions for questions so we can keep issues for actual issues. |
Beta Was this translation helpful? Give feedback.
That's correct, the file is uploaded under a temp filename, but extravars are sent with the original name so that you can move/copy/rename the file in ansible. So you can rename it back to the original name.