# |
Apr 21st 2017, 14:28 |
hmic |
:~ |
# |
Apr 21st 2017, 14:28 |
hmic |
so this works on good will only? |
# |
Apr 21st 2017, 14:27 |
styks198- |
I will refactor to a different location later, but I am more interested in the concept for updating associated data |
# |
Apr 21st 2017, 14:27 |
styks198- |
that it was sent… |
# |
Apr 21st 2017, 14:27 |
styks198- |
UPS doesn’t give me an id, so with their api when they respond they just respond in order |
# |
Apr 21st 2017, 14:26 |
hmic |
styks198-: first off: you are in the wrong context likely. this should be in the shipments table i think. secondly: how and why do the keys of $shipmentPackagesResponses and $shipmentPackages correspond? |
# |
Apr 21st 2017, 14:22 |
styks198- |
sjundec: yea, I used to make all my own uploaders but like Neon1024 said, that is more of a frontend devs job just I substitued the frontend dev with filestack instead |
# |
Apr 21st 2017, 14:21 |
sjundee |
that is interesting @styks198- |
# |
Apr 21st 2017, 14:20 |
styks198- |
https://gist.github.com/styks1987/437f16e1fd290832eff28e171e46ef15 |
# |
Apr 21st 2017, 14:20 |
styks198- |
hmic: here is something on your turf. Do you know if there is a better way to update associated data. This just feels wrong |
# |
Apr 21st 2017, 14:19 |
Neon1024 |
dereuromark, Figured it out Chronos is not an instance of DateTime, but an instance of DateTimeImmutable! |
# |
Apr 21st 2017, 14:19 |
styks198- |
It is handy for showing previews before upload |
# |
Apr 21st 2017, 14:19 |
styks198- |
:) |
# |
Apr 21st 2017, 14:19 |
styks198- |
hmic: just in case you are curious. https://developer.mozilla.org/en-US/docs/Web/API/FileReader/readAsDataURL |
# |
Apr 21st 2017, 14:19 |
hmic |
i am likey wrong, as i never tried. but security context would advise it be like i say |
# |
Apr 21st 2017, 14:18 |
hmic |
styks198-: thats not my business really, but i still doubt this api is accessible from a normal website, only if run from a local (app) context! |
# |
Apr 21st 2017, 14:18 |
sjundee |
Allright. I was having a look at burzums imagine plugin, which also will let me resize. |
# |
Apr 21st 2017, 14:17 |
styks198- |
hmic: I believe the html5 file api allows you access to the data url before the file is ever uploaded |
# |
Apr 21st 2017, 14:17 |
hmic |
you can, *if* you are on a mobile app with e.g. phonegap or how they call it today, but not a website IMHO |
# |
Apr 21st 2017, 14:16 |
hmic |
i would not think canvas can include/access local files |
# |
Apr 21st 2017, 14:16 |
sjundee |
true hmic. |
# |
Apr 21st 2017, 14:16 |
styks198- |
on the subject of file uploaders. I have used filestack for a while now and they are rock solid for transforms, resize, whatever you need. |
# |
Apr 21st 2017, 14:15 |
styks198- |
and data file urls |
# |
Apr 21st 2017, 14:15 |
styks198- |
hmic: I think you can resize using canvas |
# |
Apr 21st 2017, 14:15 |
hmic |
not the app owner, but your mobile data usage! |
# |
Apr 21st 2017, 14:15 |
sjundee |
So @neon1024 , Ill check out the link you provided. |
# |
Apr 21st 2017, 14:14 |
sjundee |
On a touch phone, no way you would care about reducing filesize to please the app owner :P |
# |
Apr 21st 2017, 14:14 |
Neon1024 |
Although if the file is over your upload_limit or form_size ini variables, it’ll not make it to your server as styks198- alluded to |
# |
Apr 21st 2017, 14:13 |
Neon1024 |
:p |
# |
Apr 21st 2017, 14:13 |
Neon1024 |
#winner |
# |
Apr 21st 2017, 14:13 |
sjundee |
No, server side, as I expect user not to adjust file before or after upload |
# |
Apr 21st 2017, 14:13 |
hmic |
from within a webpage? - i doubt js can do that |
# |
Apr 21st 2017, 14:12 |
styks198- |
they don’t want to upload the huge image |
# |
Apr 21st 2017, 14:12 |
styks198- |
I assume because they are on mobile |
# |
Apr 21st 2017, 14:12 |
Neon1024 |
I’d make a ticket for the front-end developer :p |
# |
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 |