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

⬇️ refactor: Assistant File Downloads #2364

Merged
merged 8 commits into from
Apr 9, 2024
Merged

⬇️ refactor: Assistant File Downloads #2364

merged 8 commits into from
Apr 9, 2024

Conversation

danny-avila
Copy link
Owner

@danny-avila danny-avila commented Apr 9, 2024

Summary

Necessary refactor to ensure file download request URI is maintained across remote server handling

  • NGINX use of $request_uri variable
  • simplify process by only passing file_id to file download API request
  • explicit expectation of application/octet-stream response content type

Other changes

  • Added an alternative compose file for easier testing in remote environments, where the librechat-api is ran locally via npm
  • Added additional logging to file/downloads route

Checklist

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • I have commented in any complex areas of my code
  • I have made pertinent documentation changes
  • My changes do not introduce new warnings
  • I have written tests demonstrating that my changes are effective or that my feature works
  • Local unit tests pass with my changes
  • Any changes dependent on mine have been merged and published in downstream modules.
  • New documents have been locally validated with mkdocs

@danny-avila danny-avila changed the title refactor: Assistant File Downloads ⬇️ refactor: Assistant File Downloads Apr 9, 2024
@danny-avila danny-avila merged commit cb64b84 into main Apr 9, 2024
3 checks passed
@danny-avila danny-avila deleted the file-downloads branch April 9, 2024 18:26
@danny-avila
Copy link
Owner Author

Addresses issue raised here: #2358 (reply in thread)

jinzishuai pushed a commit to aitok-ai/LibreChat that referenced this pull request May 20, 2024
* refactor(getFiledownload): explicit accept of `application/octet-stream`

* chore: test compose file

* chore: test compose file fix

* chore(files/download): add more logs

* Fix proxy_pass URLs in nginx.conf

* fix: proxy_pass URLs in nginx.conf to fix file downloads from URL

* chore: move test compose file to utils dir

* refactor(useFileDownload): simplify API request by passing `file_id` instead of `filepath`
kenshinsamue pushed a commit to intelequia/LibreChat that referenced this pull request Sep 17, 2024
* refactor(getFiledownload): explicit accept of `application/octet-stream`

* chore: test compose file

* chore: test compose file fix

* chore(files/download): add more logs

* Fix proxy_pass URLs in nginx.conf

* fix: proxy_pass URLs in nginx.conf to fix file downloads from URL

* chore: move test compose file to utils dir

* refactor(useFileDownload): simplify API request by passing `file_id` instead of `filepath`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant