webdev – I'm Knight https://imknight.net From Freelancer to Bootstrapper Mon, 16 Jan 2017 14:12:43 +0000 en-US hourly 1 https://wordpress.org/?v=4.9.8 Tips for using Plupload https://imknight.net/development/tips-for-using-plupload/ https://imknight.net/development/tips-for-using-plupload/#comments Wed, 08 Jun 2011 15:13:17 +0000 https://imknight.net/?p=2382 For the past few day I was busy with a project that involve multi file uploader, the client need a replacement for their original tools and I manage to find this wonderful multiple file...

The post Tips for using Plupload appeared first on I'm Knight.

]]>
For the past few day I was busy with a project that involve multi file uploader, the client need a replacement for their original tools and I manage to find this wonderful multiple file upload utility that support different uploading method – Plupload.

Plupload is by the same company which are very famous with their WYSIWYG editor – tinymce and they  share the code on Github as open source and welcome everyone to contribute. So far Plupload is one of the most powerful file uploader that I been using , the only problem is their documentation is really outdated , the API doc looks weird to me too , the only way to learn how their API work is through the example on their home page and the sample file that come with their download package.

I would like to share some of the options that I found through testing and forum crawling.

  • file_data_name – this option allow you to set your uploaded file parameter , instead of just $FILES , it will become $FILES[‘Filedata’] , this normally use when you already have code for handle uploaded file process , using the same $FILES param can avoid to rewrite the uploaded file process. (some of the flash-based uploader is using $FILES[‘Filedata’] as default ).
  • container – this option might seem useless at the beginning, since you can just declare you action trigger button by browser_button but at least I know it really help during one scenario , when your file uploader is in the modal windows/lightbox/colorbox. If you never declare the modal windows name as container , you will find out that your upload button is only work on top ,if you scrolling down your page the button not longer work , because the hidden layer that respond to the button click is stay on top without follow the modal window moving down.
  • multi_selection – although this uploader support multi file upload , but there will be time you only want to limit the user to select 1 file only to upload, assign ‘false’ to this options will prevent user from select more then 1 file to upload.
  • multipart_params – the common way to submit some value with file upload normally is using the hidden field, but that’s not going to work in this case, you need to assign the parameter that you wish to submit together with your uploaded file in key/value pair.
  • If you doing ajax call for each upload file , example giving a unique id for each file, remember don’t turn on chunking, it will split your file into smaller chunk and each uploaded chunk will be sending you back a result, which will totally mess up that unique id purpose.

P/S the feature table on the official site is really outdated, example chunking and drag & drop is fully support on Chrome now, don’t give up if you think some of the feature you need but seem like not support , download and give it a try.

Let’s me know if you any tips to share for Plupload !

The post Tips for using Plupload appeared first on I'm Knight.

]]>
https://imknight.net/development/tips-for-using-plupload/feed/ 1
You Might be a Web Developer https://imknight.net/non-tech/you-might-be-a-web-developer/ https://imknight.net/non-tech/you-might-be-a-web-developer/#respond Thu, 09 Oct 2008 13:58:48 +0000 https://imknight.net/?p=1661 Just saw this Hey, Canadian Web Developers! Does This Sound Familiar? and find it very funny, yeah kind of agree some of the statement is quite true. If your first question is “Where’s the...

The post You Might be a Web Developer appeared first on I'm Knight.

]]>
Just saw this Hey, Canadian Web Developers! Does This Sound Familiar? and find it very funny, yeah kind of agree some of the statement is quite true.

If your first question is “Where’s the API?” when a site launches, you might be a Web developer

– Yes, most of the time when i found some good web2.0 service the first thing that appear in my mind is where is the API, second question will be where is the 3rd party tools.

If you own more than ten domain names, you might be a Web developer

– So true for myself , i have more then 10 domain ..

If your best pick-up line is “#you + #me { margin: 0; }”, you might be a Web developer.

– This is my favourite

here come my one – if you use more then 1 browser, you might be a Web developer

The post You Might be a Web Developer appeared first on I'm Knight.

]]>
https://imknight.net/non-tech/you-might-be-a-web-developer/feed/ 0
Configure Web Dev on your Mac – MAMP https://imknight.net/mac/configure-web-dev-on-your-mac-mamp/ https://imknight.net/mac/configure-web-dev-on-your-mac-mamp/#respond Sat, 22 Mar 2008 16:40:06 +0000 https://imknight.net/2008/03/23/configure-web-dev-on-your-mac-mamp/ I  have just complete configure my iMac for web development on Leopard, so blog about my experience and research to share with the rest. What does MAMP stand for ?  MAMP stand for Mac,...

The post Configure Web Dev on your Mac – MAMP appeared first on I'm Knight.

]]>
I  have just complete configure my iMac for web development on Leopard, so blog about my experience and research to share with the rest. What does MAMP stand for ?  MAMP stand for Mac, Apache, Mysql and PHP compare to LAMP ( Linux ) and WAMP (Windows)

If you not familiar with command prompt/linux/unix style, the easiest way to setup web development environment on your mac is  make use of all in one binrary, which idiot proof that install everything in one package. These package include xampp , mamp and php apache module.

I did use mamp on my macbook pro before due to Tiger is using outdated version of apache and php, my new iMac is come with leopard , so  i m tempted to configure myself , in stead of using all-in-one package.

Leopard come with apache 2 and php 5 by default, just uncomment some code and it’s good to go.

  1. Working with PHP 5 in Mac OS X 10.5  – a most complete guide
  2. Getting MySQL Preference work on in Leopard – after download mysql5 and install, the preference for mysql seem like not working, get the apple script from this post to fix it.
  3. Connecting PHP to MYSQL – although this apple support document is for macos server but it work for macos leopard too, this is to patch the mysql.socket issue.

So there are few solution for point 3, which one i use ? i just edit the php.ini to point to /tmp/mysql.socket , in stead of create the my.cnf, because the preference patch from point 2 seem like crash with the solution that create the my.cnf file, if you have the same problem, try to kill all the mysql process first , remove the my.cnf and  restart the mysql server.
Maybe tomorrow i should try getting the ruby n railds work on leopard too.

The post Configure Web Dev on your Mac – MAMP appeared first on I'm Knight.

]]>
https://imknight.net/mac/configure-web-dev-on-your-mac-mamp/feed/ 0