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

Allow file uploads #49

Merged
merged 4 commits into from
Sep 4, 2024
Merged

Allow file uploads #49

merged 4 commits into from
Sep 4, 2024

Conversation

dontub
Copy link
Contributor

@dontub dontub commented Aug 2, 2024

This change allows to upload files in remote entity forms. Files have to be transmitted in the following form in the form data:

{
  "filename": <string>,
  "content": <Base64 encoded file>
}

In the JSON schema existing files are specified as default in the following form:

{
  "filename": <string>,
  "url": <URL to download the file>
}

Because of the Base64 encoding a possible maximum file size is only validated approximately.
See FileFieldFactory.

There are two TODOs:

  1. What to do with previous files? https://github.com/systopia/de.systopia.remotetools/pull/49/files#diff-2a75cd2f53711c0051277a95edc7a2ae42bb31413045d54074cbab774d4c2ff9R66
  2. It's not possible to set a custom file field to NULL. https://github.com/systopia/de.systopia.remotetools/pull/49/files#diff-2a75cd2f53711c0051277a95edc7a2ae42bb31413045d54074cbab774d4c2ff9R99 (Not necessary for the current use case.)

How should we treat them?

systopia-reference: 25860

@dontub dontub force-pushed the allow-file-uploads branch 2 times, most recently from 5059781 to a2e63d2 Compare August 2, 2024 09:33
@dontub dontub requested a review from jensschuppe August 2, 2024 09:44
@dontub dontub added enhancement New feature or request status:needs review Code needs review and testing. labels Aug 2, 2024
@dontub dontub marked this pull request as draft August 2, 2024 09:44
Base automatically changed from allow-profile-code-before-and-after-entity-values-are-written to master September 4, 2024 11:50
@dontub dontub force-pushed the allow-file-uploads branch 2 times, most recently from dc26106 to 3a6e70e Compare September 4, 2024 13:00
@dontub dontub marked this pull request as ready for review September 4, 2024 14:18
@dontub dontub merged commit 96d51cf into master Sep 4, 2024
9 checks passed
@dontub dontub deleted the allow-file-uploads branch September 4, 2024 14:18
@dontub dontub added status:fixed The issue has been resolved (usually by committing/merging code). and removed status:needs review Code needs review and testing. labels Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request status:fixed The issue has been resolved (usually by committing/merging code).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants