-
Notifications
You must be signed in to change notification settings - Fork 145
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
Action bar does not have "Add File" action #59
Comments
Hi @raveenakothapally, as mentioned in #52 we use a separate component for uploading files that updates the file browser if the upload is successful. We don't have any plans to add an Add File button to the actions bar but if you'd like to contribute, make a PR and we will review :) |
@jlo-1,
The library differentiates a file from a folder based on This may not be reliable as the library may internally update to a different logic in future to differentiate files and folders. Also, it will be nice to have an |
This will be changing in the next release to look for trailing slashes instead. |
@raveenakothapally |
Well, I also want to allow user to manually click add file while in a directory(just like user can click delete when in a directory) and on that open file selector, and on selection of files, upload those files. The solution @raveenakothapally has pasted i believe may work for creating empty files, but not to upload files with manual selection instead of drag and drop. |
Exactly what I'm looking for |
@jestrickler if you are talking about what i mentioned, I have put in a rough patch, but for that i had to copy whole plugin as i needed to modify multiple files and at the time had few other issues to fix as well in same plugin If you want i can share those details, or perhaps put up a pr if possible. TBH this plugin is not mature and needs a lot of work, but hey, something is better than nothing. Its best out there yet. So kudos to creator and maintainers for their efforts |
@ziaulrehman40 Sorry I didn't see this until now... I ended up copying and modifying the ActionRenderer to add an 'Add Files' action that launches a file picker: |
@jestrickler can you please guide me on how to pass props.browserProps ? because when I pass using it as a component, I am getting an error an eerror I tried to pass like the below The error which occured in the console. I am referring to the below line of your code. Appreciate you reply. Thanks in advance |
@mk-navex you don't need to create the ActionRenderer directly or pass the browserProps. You set the actionRenderer property along with other props when you create the KeyedFileBrowser and let the library handle it:
Hope that helps! |
@jestrickler Exactly what I wanted. Thank you for such a timely help. |
I failed to find a way to add a new file via action bar. Is this something that should be done differently outside of the library (Like adding a new file to
files
prop) or is there a way to get this done through action bar?The text was updated successfully, but these errors were encountered: