Skip to main content
8 events
when toggle format what by license comment
Jul 11, 2015 at 6:12 comment added janos If you would like a review of your revised version, it will be best to post another question
Jul 11, 2015 at 3:46 comment added JasonDavis Instead of posting as an answer I might just append to my question
Jul 11, 2015 at 3:45 comment added JasonDavis Using your suggestions as well as some ideas from a WordPress core file I have a re-write I am going to post as an answer here so others might be able to use it as well as improve upon it and would love your feedback on it if you're up for it. There doesn't seem to be any open source libraries for this purpose that I can find anyways! I now have a function that iterates an array of transport methods to test each one until one passes and then calls a function with that name. Also is function for each upload transport method so its more modular now
Jun 26, 2015 at 21:28 comment added janos I don't know other methods, but I'm not an expert at this
Jun 26, 2015 at 21:21 comment added JasonDavis Can I ask, do you know of any upload methods I may have missed? I was thinking of using the array of upload methods I defined at the top to maybe loop over attempting the upload and if it tries one and fails, it would move on and try the next available method. I assume using a try{} and catch block could help with this now that I know what most of these methods return on failure.
Jun 26, 2015 at 21:16 comment added JasonDavis Code after die() is another case of a silly mistake. It seems all you mentioned are things I should know better to do however I managed to let the slip in anyways! I do appreciate you pointing them out so I can it all up at least. As for uploadRemoteImage doing to much. I agree it could be broken down into about 3-4 more methods and I will probably do that. Again thanks for reviewing it, it;s amazing the things you can overlook yourself after hours of looking at something. I think the main source of issues is the fact I had refactored the whole Class about 8 times so it kept changing
Jun 26, 2015 at 21:16 comment added JasonDavis Thanks for the comments and feedback. As for the ` $imageFIle = FI` that is just a type. The different camelCase vs snake_case is mostly just an oversight I built this between 12 and 4am. I'm not making excuses (I know better), just mentioning the reasons! ....
Jun 26, 2015 at 19:43 history answered janos CC BY-SA 3.0