Welcome Guest, Not a member yet? Register   Sign In
Codeigniter Multiple Upload Images/ files / video / audio files

After submitting the form (with files) I get no error and no progress either, files aren't uploaded, I have created 'uploads' folder in CI root


And btw, how can I change upload directory dynamically with the same form? (I want to have multiple folders ex. banners, images, pdf,doc etc..) User can choose folder from select box.

Current script:
if($.fn.wl_File) $.fn.wl_File.defaults = {
url: 'http://localhost/ci/assets/upload.php',
autoUpload: true,
paramName: 'files',
multiple: false,
allowedExtensions: ['jpg','jpeg','gif','png','PNG','doc','zip','docx','txt','pdf','rar'],
maxNumberOfFiles: 0,
maxFileSize: 10000,
minFileSize: 0,
sequentialUploads: false,
dragAndDrop: true,
formData: {},
text: {
  ready: 'pripravljen',
  cancel: 'prekliči',
  remove: 'odstrani',
  uploading: 'nalagam...',
  done: 'končano',
  start: 'začni shranjevanje',
  add_files: 'dodaj datoteke',
  cancel_all: 'prekliči shranjevanje',
  remove_all: 'odstrani vse'
onAdd: function (e, data) {},
onSend: function (e, data) {},
onDone: function (e, data) {},
onFinish: function (e, data) {},
onFail: function (e, data) {},
onAlways: function (e, data) {},
onProgress: function (e, data) {},
onProgressAll: function (e, data) {},
onStart: function (e) {},
onStop: function (e) {},
onChange: function (e, data) {},
onDrop: function (e, data) {},
onDragOver: function (e) {},
onFileError: function (error, fileobj) {
  $.msg('Neveljavna datoteka: ' + fileobj.name, {
   header: error.msg + ' (' + error.code + ')'

'upload_dir' => dirname(__FILE__).'/uploads/',
            'upload_url' => dirname($_SERVER['PHP_SELF']).'/uploads/',

To (doesn't work)
'upload_dir' => dirname(__FILE__).'/'.$_REQUEST['folder'].'/',
            'upload_url' => dirname($_SERVER['PHP_SELF']).'/'.$_REQUEST['folder'].'/',

Because I get 'Undefined variable: folder'

Messages In This Thread
Codeigniter Multiple Upload Images/ files / video / audio files - by El Forum - 08-04-2012, 03:25 AM

Theme © iAndrew 2016 - Forum software by © MyBB