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

pass the initial params to final url #7

Open
mapopa opened this issue Jun 27, 2013 · 3 comments
Open

pass the initial params to final url #7

mapopa opened this issue Jun 27, 2013 · 3 comments

Comments

@mapopa
Copy link

mapopa commented Jun 27, 2013

I need some params to be passed to the final url when the file uploading is finished

a config option like in nginix-upload-module upload_pass_form_field

@mapopa
Copy link
Author

mapopa commented Jun 27, 2013

If upload_pass_form_field is set then
I would get the list of args
like args = ngx.req.get_post_args()

but i don't know how to pass it to end_backend in ctx

@pgaertig
Copy link
Owner

Generally with RAW POST upload there is no way to attach data to payload other than use URL query params or custom HTTP headers. For sure you can introduce your own HTTP header, i.e. X-My-File-Metadata, and that header will be passed up to back-end. I haven't tested URL query params yet. Try to concat $query_string to backend_url and let us know about your results.

@pgaertig
Copy link
Owner

And of course you can pass params using URL path i.e. /files/23123/abc/def then you can use location statement with regular expression to extract what you need and build backend_url using these matches.

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