How to handle UploadedFile
?
#111
Unanswered
mustafaahci
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am using
spatie/laravel-data
withspatie/laravel-typescript-transformer
and I have a Data class that includes file uploads:When I run
php artisan typescript:transform
, theUploadedFile
properties are being generated asany
type in TypeScript (but I expect them to be of typeFile
).Is
UploadedFile
the right one to use? Am I missing any built-in options?What’s the recommended approach for handling file uploads in a TypeScript transformation?
Should I:
#[LiteralTypeScriptType()]
?default_type_replacements
?Beta Was this translation helpful? Give feedback.
All reactions