An elegant way to get file path from frontend to backend #339
Unanswered
bengulliano
asked this question in
Q&A
Replies: 1 comment 1 reply
-
For now I resolved to: I must add that the application will always be installed and run locally on the user's PC. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Please I would like to have a user select a file through a html input element -> send the file to the pywebio server -> and use rsync to copy the file to a remote destination (using subprocess.Popen).
Due to browser limitations the path to the file is not available, so the only option will be to save the file first in a temporary folder or create a symlink to the file and use the temporary file or symlink as a reference in the rsync operation.
I think this not a very elegant solution because of having to copy the file twice,
and another issue is that rsync will not accept a window.URL.createObjectURL(file) object as local file with error "The source and destination cannot both be remote", this is why I thought of copying the file to a temp location first
I wonder if you can recommend a more elegant solution.
Beta Was this translation helpful? Give feedback.
All reactions