# |
Jul 18th 2017, 16:52 |
chris-andre |
Yes @saeideng . At most 10 images. |
# |
Jul 18th 2017, 16:51 |
chris-andre |
Right, good points @hmic . Thanks. I think of the option/example you told. |
# |
Jul 18th 2017, 16:50 |
saeideng |
your images output is like `img ... ><img ... >.............. <img..` ??:grinning: |
# |
Jul 18th 2017, 16:50 |
hmic |
this makes (only) sense to embed *small* images to not have the overhead of doing another request to the webserver - this means: 1k or less for me. like icons. usually you would not even bother to encode them dynamically but put them base64 encoded in the markup, which is especially beneficial on mobile |
# |
Jul 18th 2017, 16:48 |
hmic |
you would rather create an controller action like: function getImage($photo) { ob_end_flush(); readfile($this->Image->imageUrl($photo)); } and link to that in the img src |
# |
Jul 18th 2017, 16:48 |
chris-andre |
Why I'm asking, didn't really think of that. |
# |
Jul 18th 2017, 16:47 |
saeideng |
yes and no |
# |
Jul 18th 2017, 16:47 |
chris-andre |
:oncoming_police_car: Allright. So it is clearly a bad idea |
# |
Jul 18th 2017, 16:46 |
hmic |
and the browsers, especially mobile ones, will have a hard time decoding the 100MBs of base64 encoded data |
# |
Jul 18th 2017, 16:45 |
hmic |
you add 1/3rd of additional traffic overhead on the webserver too for encoding them base64 |
# |
Jul 18th 2017, 16:45 |
hmic |
you would need your php to buffer all that crap, using up *lots* of memory |
# |
Jul 18th 2017, 16:44 |
hmic |
and displaying many of them? |
# |
Jul 18th 2017, 16:44 |
hmic |
have you thought of images bigger than some kb? |
# |
Jul 18th 2017, 16:44 |
chris-andre |
Yes. Why? That bad idea/practice? |
# |
Jul 18th 2017, 16:42 |
hmic |
chris-andre: really? |
# |
Jul 18th 2017, 16:42 |
chris-andre |
Are there other preferred ways of doing this, or I'm a fool thinking this at all? :P |
# |
Jul 18th 2017, 16:41 |
chris-andre |
Hi. I don't like the idea of having uploaded pictures etc available in a public folder or as a symbolic link, as one simply can share the direct link. What do you think of this way of rendering/showing pictures? https://gist.github.com/chris-andre/36d41ec5b7ac4b8ad0c7e2447096f814 |
# |
Jul 18th 2017, 16:33 |
savant |
ok :slightly_smiling_face: |
# |
Jul 18th 2017, 16:33 |
glafarge |
Sorry, my mistake :slightly_smiling_face: |
# |
Jul 18th 2017, 16:32 |
savant |
You can invite someone to the CakePHP slack via the invite app: http://cakesf.herokuapp.com/ |
# |
Jul 18th 2017, 16:32 |
savant |
@glafarge why did you unpin that? |
# |
Jul 18th 2017, 16:32 |
ericadeefox |
I'll do that. ^^ trace stacks and all that |
# |
Jul 18th 2017, 16:29 |
jeremyharris |
pepper debug statements debugging the request along the dispatch process |
# |
Jul 18th 2017, 16:29 |
jeremyharris |
it’s probably worthwhile to figure out what in your app is removing it :slightly_smiling_face: |
# |
Jul 18th 2017, 16:25 |
ericadeefox |
hmm... don't know what could be removing it. I had initially just wanted to fake the query string but now I'm like, ew, why doesn't this work for me? which I suppose is why we test, after all |
# |
Jul 18th 2017, 16:19 |
jeremyharris |
if it’s missing in the app but present in buildRequest, there’s something in the app that’s removing them (perhaps a component, a dispatch filter / middleware) |
# |
Jul 18th 2017, 16:19 |
ericadeefox |
I debugged from the app... I'll go ahead and debug from the test now |
# |
Jul 18th 2017, 16:18 |
jeremyharris |
it should be, there are tests for it :slightly_smiling_face: plus lots of people rely on that working |
# |
Jul 18th 2017, 16:17 |
jeremyharris |
did you debug the request that is created by the integration test case first? if it’s building it correctly, it’s the app that’s the culprit |
# |
Jul 18th 2017, 16:16 |
ericadeefox |
^^I did that. at the beginning of the method in the app, I have `if (empty(filter_input(INPUT_SERVER, 'QUERY_STRING')))`, which in `debug()` turned up true |
# |
Jul 18th 2017, 16:15 |
ericadeefox |
nope. just trying to `$this->get()` a url w query string params |
# |
Jul 18th 2017, 16:15 |
jeremyharris |
throw a debug in the integration test after build request happens; it might be building the request correctly but the app itself is doing something |
# |
Jul 18th 2017, 16:14 |
jeremyharris |
nope, it’s a pretty standard test. do you have any components prg, or anything else playing with query params? |
# |
Jul 18th 2017, 16:13 |
ericadeefox |
do you do anything with `$this->_url()` in those tests at all? because, in my tests, `?query=string` is just outright ignored. it says there is no query string params set, when I debug. |
# |
Jul 18th 2017, 16:10 |
ericadeefox |
x_x "this is a different" |
# |
Jul 18th 2017, 16:09 |
ericadeefox |
and then the the query string parameters are f-- |
# |
Jul 18th 2017, 16:09 |
jeremyharris |
yup |
# |
Jul 18th 2017, 16:09 |
ericadeefox |
welp. you mean, like, `$this->get('/controller/view?query=string')`? |
# |
Jul 18th 2017, 16:08 |
jeremyharris |
I have several tests that do that |
# |
Jul 18th 2017, 16:08 |
ericadeefox |
should it?! omg |
# |
Jul 18th 2017, 16:08 |
jeremyharris |
it should :slightly_smiling_face: |