-
Notifications
You must be signed in to change notification settings - Fork 996
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
DRAFT: feat - Storage and Uploads (for Feedback) #11696
base: main
Are you sure you want to change the base?
Conversation
<section> | ||
<div {...getRootProps({ className: combinedClassName })}> | ||
<input {...getInputProps({ name })} /> | ||
<p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that I look at this, it might be better to have this render some children instead of setting messages. and then maybe can place preview renderers where one wants to and well as define message components. Would need to export out some of the isDragActive and accpectedfiles to use perhaps.
packages/cli/src/commands/setup/uploads/templates/api/services/redwoodUploads.ts.template
Outdated
Show resolved
Hide resolved
|
||
constructor({ secret }: { secret: string }) { | ||
super() | ||
this.secret = secret |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should throw an error here if secret
is undefined
or some other falsy value. The types are supposed to protect us from this, but often the secret comes from an env var and the types for those are unreliable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc' @Josh-Walker-GM on this ^
packages/cli/src/commands/setup/storage/templates/withStorage.directive.ts.template
Outdated
Show resolved
Hide resolved
packages/cli/src/commands/setup/storage/templates/withStorage.directive.ts.template
Outdated
Show resolved
Hide resolved
packages/cli/src/commands/setup/uploads/templates/api/directives/requireUploadToken.ts.template
Outdated
Show resolved
Hide resolved
rejectClassName = '', | ||
buttonClassName = '', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might want to update .vscode/settings.json
to add these to the list of Tailwind class attributes if the user has TW setup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will if we decide to keep the button as an option. I wonder if better not just to expose the open
and let people render buttons and messages as children of the drops zone instead?
…/redwoodUploads.ts.template Co-authored-by: Tobbe Lundberg <[email protected]>
…directive.ts.template Co-authored-by: Tobbe Lundberg <[email protected]>
This PR combines @Josh-Walker-GM storage rework branch a my uploads rework.
Making a draft PR so that team can add comments and feedback.
Feature may com in under separate PRs when functionally complete.