-
I understand that the input/output becomes a Filelike object. I want to get the filename because I will use it for post processing. I tried calling input.name but it returns None. I also tried input.path but I get an "TypeError: Expected str, got bytes" on "raw_path = urllib.request.url2pathname(urllib.parse.unquote(parsed.path))" line. It seems very obvious but I cant seem to find the way to get the filename. Thank you in advance for your guidance! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 9 replies
-
Hi! There currently isn't a way to get a filename, as there is no actual file on disk. If you need to pass a filename to something unfortunately you'll have to write it manually first. |
Beta Was this translation helpful? Give feedback.
-
@sauyon thank you for reply! I tried to use the Multipart API descriptor so that I can write the file name and also upload the data. I used the following code
However, I got a BentoMLException: File should have Content-Type b'application/octet-stream' or b'multipart/form-data', got b'video/mp4' instead. I tried using multipart with other descriptor like NumpyNdarray, it did not raise an error. What do you think? |
Beta Was this translation helpful? Give feedback.
Hi! There currently isn't a way to get a filename, as there is no actual file on disk. If you need to pass a filename to something unfortunately you'll have to write it manually first.