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

RichFilemanager upload event #275

Closed
supun19 opened this issue Jan 3, 2018 · 6 comments
Closed

RichFilemanager upload event #275

supun19 opened this issue Jan 3, 2018 · 6 comments
Assignees
Milestone

Comments

@supun19
Copy link

supun19 commented Jan 3, 2018

In my case: I configured RichFilemanager with S3 bucket. I have another application which can upload file to S3 bucket. So I need a mechanism when I upload file to S3 bucket through other application the RichFilemanger would be known. I found few solution(pub/sub solution).
So I need rich file manager to refresh the listing of files, when I upload a file to S3 using my other application.

  1. S3 bucket can subscribe Amazon Simple Notification Service. So If we could implement mechanism to subscribe ASN in RichFilemanger.

  2. S3 can trigger lambda function. In this scenario we have own socket server. RichFilemanager subscribed to a socket server. When S3 trigger event to run a lambda function It notifies the socket server. Then socket server push message to RichFilemanager.

****I would like to know whether RichFilemanger has event mechanism to update
where when receive a update massage to refresh browser(read whole folder again because new file are received)

@psolom
Copy link
Owner

psolom commented Jan 4, 2018

This feature is easy to implement if you are talking about the client-side method that will update (refresh) the currently open folder with a server request.

RichFilemanager already has public methods mechanism, for example you can try this one at the demo page:

$('.fm-container').data('richFilemanager').error('Test error');

I can add a method to reload the currently open folder.

Let me know if this is what you want.

@supun19
Copy link
Author

supun19 commented Jan 4, 2018

Yes, that is exactly what I'm looking for

@psolom psolom added this to the 2.7.1 milestone Jan 6, 2018
@psolom psolom self-assigned this Jan 6, 2018
@psolom
Copy link
Owner

psolom commented Jan 6, 2018

Added 2 public plugin methods.

Use this one to reload the currently viewed folder:

$('.fm-container').data('richFilemanager').refreshFolder(applyTreeNode);

And this one is to load content of specified relative folder path:

$('.fm-container').data('richFilemanager').loadFolder(relativePath, applyTreeNode);

The applyTreeNode argument expects boolean value and defines whether appropriate filetree node should be reloaded (adjusted) as well. This will take effect only if the filetree node exists and visible.

This feature affected some core methods, so let me know if you find that something is broken, please.

@supun19
Copy link
Author

supun19 commented Jan 7, 2018

Thank You Very much and If i get issue i will let you

@supun19
Copy link
Author

supun19 commented Jan 8, 2018

no any issue it is work as I expect

@psolom psolom closed this as completed Jan 8, 2018
@psolom
Copy link
Owner

psolom commented Feb 25, 2018

Released in v2.7.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants