Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UploadFile/Async with filePath sets whole path as filename #308

Open
Felix2711 opened this issue Dec 11, 2024 · 1 comment
Open

UploadFile/Async with filePath sets whole path as filename #308

Felix2711 opened this issue Dec 11, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Felix2711
Copy link

Service

OpenAI

Describe the bug

When using OpenAIFileClient.UploadFile/Async directly with a filepath. The Uploaded File will have the complete Path as a name

Steps to reproduce

  1. Upload file using a path
  2. Check filename of uploaded file

Code snippets

No response

OS

winOS

.NET version

net8.0

Library version

2.0.0

@Felix2711 Felix2711 added the bug Something isn't working label Dec 11, 2024
@AngelosP
Copy link
Contributor

@Felix2711 thank you for the submission, I was able to reproduce this quite easily.

@joseharriaga the repro for this is using the overload that takes in the path. What is missing is that we don't do something like Path.GetFileName(filePath) before making the OpenAI REST API call and we just give the whole path as the filename.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants