$video->add_field('video', array('type' => 'file', 'accept' => 'mp4', 'upload_path' => assets_server_path('media'), 'overwrite' => TRUE));
I used the above code to upload video file in blocks. In dshboard, when i choose file and click save, that file has not be saved. Can anyone help me to solve this issue.
Comments
#maximum file size for uploading php_value upload_max_filesize 10MI tried this code. Using select asset field, it uploads only images not video.
To be able to upload the mp4 file type, you will need to modify the "editable_asset_filetypes" configuration. This can be done by adding the following in the fuel/application/config/MY_fuel.php:
// Specifies what filetype extensions can be included in the folders $config['editable_asset_filetypes'] = array( 'images' => 'jpg|jpeg|jpe|gif|png|zip|svg', 'pdf' => 'pdf|zip', 'media' => 'mov|mp3|aiff|mpeg|zip', 'assets' => 'jpg|jpeg|jpe|png|gif|mov|mpeg|mp3|wav|aiff|pdf|css|zip|svg|mp4' );I have given this to upload an asset (PDF file). Two buttons are displayed select image and upload asset. I need to have only the upload asset button and remove the select image button. Kindly help.
$pdf_file->add_field('pdf', array('type' => 'asset', 'select' => FALSE));