winston / attache-lambda

1 stars 0 forks source link

Simple download #9

Open choonkeat opened 6 years ago

choonkeat commented 6 years ago

unfortunately, some lambda platforms (e.g. google cloud) gives very specific url

i.e.

https://xyz.cloudfunctions.net/attache

will hit your lambda function, but

https://xyz.cloudfunctions.net/attache/abc

will NOT hit your lambda function; returns 404

so in order for us to retrieve images like

https://xyz.cloudfunctions.net/attache/resize/100x/987654321.gif

we'd need to specify instead as,

https://xyz.cloudfunctions.net/attache?resize/100x/987654321.gif

and do some strings.TrimPrefix(r.URL.RequestURI(), "/attache?") to obtain the "resize/100x/987654321.gif"