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

[Question] Any way to generate urls from javascript files? #399

Closed
ariffmunshi opened this issue Dec 14, 2015 · 4 comments

Comments

@ariffmunshi
Copy link

commented Dec 14, 2015

Is there a way to generate urls for the direct uploaded files in cache via javascript? I just updated from 0.5 any my custom urls are now returning 403s. Seems like with the new signed system, a token is needed. Was using this before to load a thumbnail preview on "upload:success" before the image upload is saved. Thanks!

@jnicklas

This comment has been minimized.

Copy link
Contributor

commented Dec 14, 2015

No, this is currently not possible. You will have to do a round-trip to the server to sign the urls. I've also run into this problem in an application, and it would be very nice if uploading the file would automatically return a signed URL.

@ariffmunshi

This comment has been minimized.

Copy link
Author

commented Dec 15, 2015

Hmm.. alright will think about it or another way to solve this. But anyway, great job on the gem so far @jnicklas !

@jnicklas jnicklas closed this Jan 11, 2016
@jnicklas

This comment has been minimized.

Copy link
Contributor

commented Jan 11, 2016

The way to solve this is to round trip to the server to generate the URL. I think this is somewhat unavoidable with the current architecture.

@RealSilo

This comment has been minimized.

Copy link

commented Feb 19, 2016

@jnicklas could you pls elaborate how you do this round trip to the server or provide a code sample?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.