On Sunday, March 15, 2015 at 4:30:35 AM UTC+11, Sven Richter wrote:
> Hi,
>
> I am still trying to integrate resumable.js. Got it mostly working so far.
> What I currenlty do is this. Define a global resumable object:
>
> (defonce resumable (js/Resumable. (clj->js {:target "/files/upload"
> :headers {:X-CSRF-Token
> (h/get-value "glob_anti_forgery")}
> :query {:g-uuid #()}})))
>
> And here we see the problem already. If I want to provide additional query
> parameters for the POST of resumable.js. You can do this with the :query key
> value pair.
>
> I want to provide some parameter depending on user input, so this will change
> after the construction of the resumable object. And the change will reside
> inside the db, which I cannot access from the outside as far as I can tell,
> but only via register-handler and register-sub.
>
> Did someone already solve a similar problem?
>
> The only thing that comes to my mind is global js state, which would be an
> anti-pattern to re-frame I guess.
>
> Best Regards,
> Sven
I'm not familiar with js/Resumable, but the doc says query can be a function.
In which case, make it a function which reads a value out of app-db (which was
put there via event handlers and user interaction)?
--
Mike
--
Note that posts from new members are moderated - please be patient with your
first post.
---
You received this message because you are subscribed to the Google Groups
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.