The usage of echo ${content} >> ${file) has caused a few problems in the Core when trying to write bash functions or environmental variables (see https://github.com/cybergis/cybergis-compute-core/issues/69). This PR seeks to replace that by instead creating a temporary local file, transferring it, and then deleting the local file.
Overview of Changes:
New transferFile function which performs the file transfer part of the upload function without the zip/unzip. upload now calls transferFile.
Rework of createFile to create a local temp file with a random unique name, transfer the file using transferFile, and delete the local copy.
The usage of
echo ${content} >> ${file)
has caused a few problems in the Core when trying to write bash functions or environmental variables (see https://github.com/cybergis/cybergis-compute-core/issues/69). This PR seeks to replace that by instead creating a temporary local file, transferring it, and then deleting the local file.Overview of Changes:
transferFile
function which performs the file transfer part of theupload
function without the zip/unzip.upload
now callstransferFile
.createFile
to create a local temp file with a random unique name, transfer the file usingtransferFile
, and delete the local copy.