leads to strange undefined behaviour as instead of creating a single file named filename.txt with content Hello World and text/plain mime-type it counterintuitively uploads three file records (assuming multiple files are allowed for this pocketbase record) The three files are all getting sort of random names like upload_fE6KCgk6LR.txt and have the content of the three strings in FileUpload respectively.
A workaround is to wrap the FileUpload argument into another python list like so:
FileUpload( ("filename.txt", "Hello World", "text/plain",) )
Trying to upload a single file record
leads to strange undefined behaviour as instead of creating a single file named
filename.txt
with contentHello World
andtext/plain
mime-type it counterintuitively uploads three file records (assuming multiple files are allowed for this pocketbase record) The three files are all getting sort of random names likeupload_fE6KCgk6LR.txt
and have the content of the three strings in FileUpload respectively.A workaround is to wrap the FileUpload argument into another python list like so:
FileUpload( ("filename.txt", "Hello World", "text/plain",) )
I think this is somewhat counter-intuitive