Is it possible to upload a file into a variable?
I have some very small csv files I want to load and parse but I don’t want to use Google Drive if at all possible.
It looks like I might be able to use BlobMedia, but I can’t make it work.
Is it possible to upload a file into a variable?
I have some very small csv files I want to load and parse but I don’t want to use Google Drive if at all possible.
It looks like I might be able to use BlobMedia, but I can’t make it work.
It’s ok, I’ve done it.
def file_loader_1_change (self, files, **event_args):
# This method is called when a new file is loaded into this FileLoader
for f in self.file_loader_1.files:
print(f.name)
print(f.length)
print(f.get_bytes())
Feel I ought to qualify why that was an issue lest you think me an idiot as it’s so obvious
The file I was uploading was a symlink to a directory I needed root to access, so it was failing (at least that’s the only reason I can find). Hence I thought the technique was flawed so I started looking at Blobs, etc.