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

Support MultipartFile parameters in Hilla generator #3133

Open
platosha opened this issue Jan 9, 2025 · 0 comments
Open

Support MultipartFile parameters in Hilla generator #3133

platosha opened this issue Jan 9, 2025 · 0 comments
Assignees
Labels
hilla Issues related to Hilla

Comments

@platosha
Copy link
Contributor

platosha commented Jan 9, 2025

Extracted from #3130

For parameters of type MultipartFile, the expected client-side TypeScript type is File.

Let us not generate a form model for MultipartFile parameters. At this point, the form binding is out-of-scope.

Some example endpoints:

@BrowserCallable
class AppEndpoint {
  public void saveFile(MultipartFile file) {
  }

  public String saveFileAsUrl(MultipartFile file) {
    file.transferTo(...);
    return "https://...";
  }

  public void saveUserWithAvatar(UserData user, MultipartFile avatar) {
  }

  public void saveAvatarWithThumbnail(MultipartFile avatar, MultipartFile thumbnail) {
  }

  public ValueSignal<FileProcessingProgress> saveAndConvertHugeFile(MultipartFile hugeFile) {
  }
}
@platosha platosha added the hilla Issues related to Hilla label Jan 9, 2025
@Lodin Lodin self-assigned this Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hilla Issues related to Hilla
Projects
None yet
Development

No branches or pull requests

2 participants