# |
Apr 21st 2017, 14:12 |
Neon1024 |
Oh, client side? |
# |
Apr 21st 2017, 14:12 |
styks198- |
sjundee: You would need some client side javascript to reduce the image before uploading |
# |
Apr 21st 2017, 14:12 |
Neon1024 |
sjundee, I’d use http://image.intervention.io/api/resize |
# |
Apr 21st 2017, 14:11 |
sjundee |
I would like to ask for advice regarding image upload directly from mobile. Mobile pictures is uploading with a big filesize. How would you reduce the filesize of the file being uploaded? |
# |
Apr 21st 2017, 14:09 |
Neon1024 |
But that’s kinda advanced topic I’d think |
# |
Apr 21st 2017, 14:08 |
Neon1024 |
i think dereuromark has plugin which can create a faux uuid linked to an id |
# |
Apr 21st 2017, 14:08 |
Neon1024 |
Or use uuid’s or something |
# |
Apr 21st 2017, 14:08 |
Neon1024 |
Try not to show your primary keys in your urls :p |
# |
Apr 21st 2017, 14:08 |
Neon1024 |
You’re welcome, good luck with it. It’ll be awesome |
# |
Apr 21st 2017, 14:07 |
birdy247 |
Thanks for the tips guys :slightly_smiling_face: |
# |
Apr 21st 2017, 14:07 |
Neon1024 |
.o> |
# |
Apr 21st 2017, 14:07 |
birdy247 |
meeting :( |
# |
Apr 21st 2017, 14:07 |
birdy247 |
im excited |
# |
Apr 21st 2017, 14:07 |
birdy247 |
awesome |
# |
Apr 21st 2017, 14:07 |
Neon1024 |
https://book.cakephp.org/3.0/en/controllers/components/authentication.html#creating-custom-authorize-objects |
# |
Apr 21st 2017, 14:06 |
Neon1024 |
Writing an auth adapter is actually really easy |
# |
Apr 21st 2017, 14:06 |
birdy247 |
cool |
# |
Apr 21st 2017, 14:06 |
Neon1024 |
I think Xety has a token auth plugin, and ADmad has JWT Auth, which do similar things |
# |
Apr 21st 2017, 14:06 |
Neon1024 |
As we have extra fields in there which I’d rather not expose |
# |
Apr 21st 2017, 14:06 |
birdy247 |
no probs |
# |
Apr 21st 2017, 14:05 |
Neon1024 |
No, I can’t sorry |
# |
Apr 21st 2017, 14:05 |
birdy247 |
care to share :) |
# |
Apr 21st 2017, 14:05 |
Neon1024 |
Probably from ADmad :p |
# |
Apr 21st 2017, 14:05 |
Neon1024 |
I have a TokenAuth class I stole from somewhere |
# |
Apr 21st 2017, 14:05 |
birdy247 |
a custom authenticator? |
# |
Apr 21st 2017, 14:05 |
birdy247 |
it* |
# |
Apr 21st 2017, 14:04 |
birdy247 |
Where do you check is? |
# |
Apr 21st 2017, 14:04 |
Neon1024 |
If you wanted to salt your token I guess |
# |
Apr 21st 2017, 14:04 |
Neon1024 |
You could use Security::hash() |
# |
Apr 21st 2017, 14:04 |
Neon1024 |
No, I used php’s sha256() method :p |
# |
Apr 21st 2017, 14:03 |
Neon1024 |
Or you could generate one as ADmad suggested using JWT, if you wanted some stuff in the token |
# |
Apr 21st 2017, 14:03 |
birdy247 |
Did you make the logic for this yourself |
# |
Apr 21st 2017, 14:03 |
birdy247 |
and then it just checks this |
# |
Apr 21st 2017, 14:03 |
Neon1024 |
Yep |
# |
Apr 21st 2017, 14:03 |
birdy247 |
So the token is stored in my Apps DB? |
# |
Apr 21st 2017, 14:03 |
Neon1024 |
We require a few other fields too with each request |
# |
Apr 21st 2017, 14:03 |
Neon1024 |
Just pass a token in the header then :) |
# |
Apr 21st 2017, 14:02 |
birdy247 |
neither |
# |
Apr 21st 2017, 14:02 |
birdy247 |
Im just after something simple |
# |
Apr 21st 2017, 14:02 |
Neon1024 |
Depends really, my stuff doesn’t need to be super duper secure |
# |
Apr 21st 2017, 14:02 |
Neon1024 |
I just wanted to be able to expire a token after a few months, so if someone gave it away it could be changed without impacting the consuming client |