-
Notifications
You must be signed in to change notification settings - Fork 42
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
complete
callback
#66
Comments
Ooo, this is a good idea. To be clear: do you want this callback in javascript? The codebase in github has diverged a lot from that actually deployed at http://dbinbox.com so a pull request would be tricky. What would be helpful on my end is if you wrote up what your ideal code would look like on your end for handling the callback, and I'll fiddle with things on my end to get that to work. |
Yes, exactly, a javascript callback. window.addEventListener('message', function (event) {
if (event.origin !== 'https://dbinbox.com') return;
if (event.data === 'add') console.log('file added');
if (event.data === 'complete') console.log('file sent');
event.source.postMessage('thanks, lad!', event.origin);
}, false); Basically the behaviour from here. |
Okay cool, I can do something like that. I'll send you an email when it's Christian. On Thu, Aug 4, 2016 at 5:44 PM, Dima Yv [email protected] wrote:
|
Great, thanks a lot! |
Hi @christiangenco!
We’re using dbinbox (basic plan) iframe for one of our projects and we want to add some notification and tracking if a file transfer is completed or at least the file is added to the queue by user.
For now embedded iframe has no any sort of messaging, though in console there is an object being logged when a file is sent, but that happens within the iframe.
Is it possible to add simple postMessage mechanism to notify about simple events like
add
,send
,progress
,complete
?Is there any sense in making a PR for that?
Thanks.
The text was updated successfully, but these errors were encountered: