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

Feature: add a new get_uploaded_file_objects that generates structued objects with the file metadata #434

Closed
edgarrmondragon opened this issue May 2, 2022 · 0 comments · Fixed by #435
Assignees
Labels
enhancement New feature or request

Comments

@edgarrmondragon
Copy link
Owner

Feature Type

Other

Description

The current options for retrieving uploaded files are

  1. Client.get_uploaded_files
  2. Client.download_files

The first one returns the raw response from LimeSurvey, and leaves everything else up to the user: base64-decoding the contents, inspect the response dictionary for the filename, size and other keys, etc. The second one offers little flexibility as files as access to the Python file-like objects is hidden to the user.

A new Client.get_uploaded_file_objects that yields instance of a new UploadedFile dataclass would give the users flexibility while doing the grunt work of inspecting the dictionary and decoding the contents for them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

Successfully merging a pull request may close this issue.

1 participant