⚠ In case you've missed it we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This forum is read-only and soon will be archived. ⚠


Akshay Hegde

Member Since 22 Dec 2014
Offline Last Active Sep 14 2015 09:54 AM
-----

Posts I've Made

In Topic: Grocery_Crud_Multiuploader library

28 July 2015 - 07:52 AM

Hi  Akshay, I've got the same issue @neoblack has:

 

The issue presents when inside the $crud you set either callback_before_insert or callback_before_update like

$crud
         ->callback_before_insert(array($this,'my_callback')    )   
         ->callback_before_update(array($this,'other_callback')    )  ;

When added to crud, the uploads are correct, however, when saving data and returning to list view, the value for filelds set as upload type will have a null value, in other words, files url are not being saved as field values

 

You would get "No files" as value in view list

 

If I comment these callbacks everything works fine.

 

How to solve the callback issue?

 

Hi Sorry for late reply, I was out of station, this issue has been fixed in current release, it was due to callback override

 

Go through github, let me know if you find any difficulties

 

https://github.com/A...d_multiuploader

 

Regards,

 

Akshay


In Topic: Grocery_Crud_Multiuploader library

21 July 2015 - 11:23 AM

Hi, nice plugin really appreciate it, but i keep getting this error:

 

A PHP Error was encountered

Severity: Runtime Notice

Message: Declaration of Grocery_CRUD_Multiuploader::upload_file() should be compatible with grocery_CRUD_Model_Driver::upload_file($state_info)

Filename: libraries/Grocery_CRUD_Multiuploader.php

Line Number: 963

I don't know if you can help me

 

Hi Thanks for reporting, kindly download updated file from github

 

https://raw.githubus...ltiuploader.php

 

- Akshay


In Topic: Grocery_Crud_Multiuploader library

08 July 2015 - 09:26 AM

I am sorry, I didn't understand your problem, could you please elaborate


In Topic: Grocery_Crud_Multiuploader library

07 July 2015 - 06:06 AM

Okay,   please open application/config/mimes.php and add types like below, I think you are using CI < 3.0.0 that is why mp4 type is missing in mimes.php

 'mp4'   =>    'video/mp4',
        ...
        ...

Here is a content of mimes.php

[akshay@localhost config]$ cat mimes.php 
<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| MIME TYPES
| -------------------------------------------------------------------
| This file contains an array of mime types.  It is used by the
| Upload class to help identify allowed file types.
|
*/

return array('hqx'	=>	array('application/mac-binhex40', 'application/mac-binhex', 'application/x-binhex40', 'application/x-mac-binhex40'),
				'cpt'	=>	'application/mac-compactpro',
				'csv'	=>	array('text/x-comma-separated-values', 'text/comma-separated-values', 'application/octet-stream', 'application/vnd.ms-excel', 'application/x-csv', 'text/x-csv', 'text/csv', 'text/plain', 'application/csv', 'application/excel', 'application/vnd.msexcel', 'text/x-c'),
				'bin'	=>	array('application/macbinary', 'application/mac-binary', 'application/octet-stream', 'application/x-binary', 'application/x-macbinary'),
				'dms'	=>	'application/octet-stream',
				'lha'	=>	'application/octet-stream',
				'lzh'	=>	'application/octet-stream',
				'exe'	=>	array('application/octet-stream', 'application/x-msdownload'),
				'class'	=>	'application/octet-stream',
				'psd'	=>	'application/x-photoshop',
				'so'	=>	'application/octet-stream',
				'sea'	=>	'application/octet-stream',
				'dll'	=>	'application/octet-stream',
				'oda'	=>	'application/oda',
				'pdf'	=>	array('application/pdf', 'application/x-pdf', 'application/x-download','application/x-download', 'binary/octet-stream', 'application/unknown', 'application/force-download'),
				'ai'	=>	'application/postscript',
				'eps'	=>	'application/postscript',
				'ps'	=>	'application/postscript',
				'smi'	=>	'application/smil',
				'smil'	=>	'application/smil',
				'mif'	=>	'application/vnd.mif',
				'xls'	=>	array('application/excel', 'application/vnd.ms-excel', 'application/msexcel', 'application/vnd.ms-office'),
				'ppt'	=>	array('application/powerpoint', 'application/vnd.ms-powerpoint', 'application/vnd.ms-office'),
				'pptx'	=>	array('application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/zip'),
				'wbxml'	=>	'application/wbxml',
				'wmlc'	=>	'application/wmlc',
				'dcr'	=>	'application/x-director',
				'dir'	=>	'application/x-director',
				'dxr'	=>	'application/x-director',
				'dvi'	=>	'application/x-dvi',
				'gtar'	=>	'application/x-gtar',
				'gz'	=>	'application/x-gzip',
				'gzip'  =>	'application/x-gzip',
				'php'	=>	'application/x-httpd-php',
				'php4'	=>	'application/x-httpd-php',
				'php3'	=>	'application/x-httpd-php',
				'phtml'	=>	'application/x-httpd-php',
				'phps'	=>	'application/x-httpd-php-source',
				'js'	=>	'application/x-javascript',
				'swf'	=>	'application/x-shockwave-flash',
				'sit'	=>	'application/x-stuffit',
				'tar'	=>	'application/x-tar',
				'tgz'	=>	array('application/x-tar', 'application/x-gzip-compressed'),
				'xhtml'	=>	'application/xhtml+xml',
				'xht'	=>	'application/xhtml+xml',
				'zip'	=>	array('application/x-zip', 'application/zip', 'application/x-zip-compressed'),
				'mid'	=>	'audio/midi',
				'midi'	=>	'audio/midi',
				'mpga'	=>	'audio/mpeg',
				'mp2'	=>	'audio/mpeg',
				'mp3'	=>	array('audio/mpeg', 'audio/mpg', 'audio/mpeg3', 'audio/mp3'),
				'aif'	=>	array('audio/x-aiff', 'audio/aiff'),
				'aiff'	=>	array('audio/x-aiff', 'audio/aiff'),
				'aifc'	=>	'audio/x-aiff',
				'ram'	=>	'audio/x-pn-realaudio',
				'rm'	=>	'audio/x-pn-realaudio',
				'rpm'	=>	'audio/x-pn-realaudio-plugin',
				'ra'	=>	'audio/x-realaudio',
				'rv'	=>	'video/vnd.rn-realvideo',
				'wav'	=>	'audio/x-wav',
				'bmp'	=>	array('image/bmp', 'image/x-windows-bmp'),
				'gif'	=>	'image/gif',
				'jpeg'	=>	array('image/jpeg', 'image/pjpeg'),
				'jpg'	=>	array('image/jpeg', 'image/pjpeg'),
				'jpe'	=>	array('image/jpeg', 'image/pjpeg'),
				'png'	=>	array('image/png',  'image/x-png'),
				'tiff'	=>	'image/tiff',
				'tif'	=>	'image/tiff',
				'css'	=>	'text/css',
				'html'	=>	'text/html',
				'htm'	=>	'text/html',
				'shtml'	=>	'text/html',
				'txt'	=>	'text/plain',
				'text'	=>	'text/plain',
				'log'	=>	array('text/plain', 'text/x-log'),
				'rtx'	=>	'text/richtext',
				'rtf'	=>	'text/rtf',
				'xml'	=>	array('application/xml', 'text/xml'),
				'xsl'	=>	'text/xml',
				'mpeg'	=>	'video/mpeg',
				'mpg'	=>	'video/mpeg',
				'mpe'	=>	'video/mpeg',
				'qt'	=>	'video/quicktime',
				'mov'	=>	'video/quicktime',
				'avi'	=>	array('video/x-msvideo', 'video/msvideo', 'video/avi', 'application/x-troff-msvideo'),
				'movie'	=>	'video/x-sgi-movie',
				'doc'	=>	'application/msword',
				'docx'	=>	array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip'),
				'odt'	=>	array('application/vnd.oasis.opendocument.text'),
				'xlsx'	=>	array('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/zip'),
				'word'	=>	array('application/msword', 'application/octet-stream'),
				'xl'	=>	'application/excel',
				'eml'	=>	'message/rfc822',
				'json'  =>	array('application/json', 'text/json'),
				'pem'   =>	array('application/x-x509-user-cert', 'application/x-pem-file', 'application/octet-stream'),
				'p10'   =>	array('application/x-pkcs10', 'application/pkcs10'),
				'p12'   =>	'application/x-pkcs12',
				'p7a'   =>	'application/x-pkcs7-signature',
				'p7c'   =>	array('application/pkcs7-mime', 'application/x-pkcs7-mime'),
				'p7m'   =>	array('application/pkcs7-mime', 'application/x-pkcs7-mime'),
				'p7r'   =>	'application/x-pkcs7-certreqresp',
				'p7s'   =>	'application/pkcs7-signature',
				'crt'   =>	array('application/x-x509-ca-cert', 'application/x-x509-user-cert', 'application/pkix-cert'),
				'crl'   =>	array('application/pkix-crl', 'application/pkcs-crl'),
				'der'   =>	'application/x-x509-ca-cert',
				'kdb'   =>	'application/octet-stream',
				'pgp'   =>	'application/pgp',
				'gpg'   =>	'application/gpg-keys',
				'sst'   =>	'application/octet-stream',
				'csr'   =>	'application/octet-stream',
				'rsa'   =>	'application/x-pkcs7',
				'cer'   =>	array('application/pkix-cert', 'application/x-x509-ca-cert'),
				'3g2'   =>	'video/3gpp2',
				'3gp'   =>	'video/3gp',
				'mp4'   =>	'video/mp4',
				'm4a'   =>	'audio/x-m4a',
				'f4v'   =>	'video/mp4',
				'aac'   =>	'audio/x-acc',
				'm4u'   =>	'application/vnd.mpegurl',
				'm3u'   =>	'text/plain',
				'xspf'  =>	'application/xspf+xml',
				'vlc'   =>	'application/videolan',
				'wmv'   =>	'video/x-ms-wmv',
				'au'    =>	'audio/x-au',
				'ac3'   =>	'audio/ac3',
				'flac'  =>	'audio/x-flac',
				'ogg'   =>	'audio/ogg',
				'pages' =>      'application/zip',
				'numbers' =>    'application/zip',
				'svg'  =>	'image/svg+xml',
				'webm' => 'video/webm',
				'ogg'  => 'video/ogv'
			);


/* End of file mimes.php */

In Topic: Grocery_Crud_Multiuploader library

06 July 2015 - 10:00 AM

Can upload file .rar and .mp4 ?

 

Yes you can upload.