martinklepsch / s3-beam

🚀 direct-to-S3 uploading using ClojureScript
Eclipse Public License 1.0
92 stars 17 forks source link

Way to extend headers and parameters sent to signing endpoint on server #23

Closed kennyjwilli closed 8 years ago

kennyjwilli commented 8 years ago

In order to use the /sign endpoint on my server an Authorization header containing a JWT must be sent with the request to the server. There is no way to add that header to the current GET request.

It would also be great if we had the ability to add parameters sent to the /sign endpoint. For example, if the user uploads directory structure rather than a single file I would like to additionally send the relative path for each file to the server.

martinklepsch commented 8 years ago

Closed by #24

martinklepsch commented 8 years ago

I think instead of passing more things from s3-pipe to sign-file we should allow swapping the sign-file call here: https://github.com/martinklepsch/s3-beam/blob/e9597742fd2901cf20aa2a177be3bc987b2d55e8/src/cljs/s3_beam/client.cljs#L140-L144

This way users can implement what ever they want. Ideally we could do that in a way that allows some reuse of things like error handling.