You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The method simple_upload(self, machine, sourcePath, targetPath) requires the source file to be an actual file on disk. There are cases (e.g. uploading a simple short text file) where the content is in memory (in a string, or in a file-like object - e.g. an already open file). Would it be possible to support passing the content or a file-like object, or this is complicated? (For now, I need to create a NamedTemporaryFile to upload the content, is this the suggested approach?)
The text was updated successfully, but these errors were encountered:
Similarly, I just realised that in simple_upload, the targetPath must be a folder (and the file will get the same filename as the source file). Is it possible to specify instead the destination filename? (This actually prevents even using a NamedTemporaryFile, I have to use a TemporaryDirectory and create a file with the correct name, and then transfer to the folder).
Even if there is no plan to change it, I suggest to clarify the docstring (now it says targetPath: the absolute target path that I would interpret as the path of the destination file)
The method
simple_upload(self, machine, sourcePath, targetPath)
requires the source file to be an actual file on disk. There are cases (e.g. uploading a simple short text file) where the content is in memory (in a string, or in a file-like object - e.g. an already open file). Would it be possible to support passing the content or a file-like object, or this is complicated? (For now, I need to create a NamedTemporaryFile to upload the content, is this the suggested approach?)The text was updated successfully, but these errors were encountered: