0

I have seen that codeigniter does not allow you to upload .xlsm files

'allowed_types' => "gif|jpg|jpeg|png|iso|dmg|zip|rar|doc|docx|xls|xlsx|ppt|pptx|csv|ods|odt|odp|pdf|rtf|sxc|sxi|txt|exe|avi|mpeg|mp3|mp4|3gp"

but I have this situation and I need to upload an .xlsm file. what do you recommend me?

When the user click on "Insertar Nuevo Calendario (upload XLSM file)", the user will select a file and it will automatically be stored always in the same folder "./download", if it exists it will be overwritten and if it does not exist it will create it again.

plantilla_view.php

<li class="nav-item dropdown">
    <a class="nav-item nav-link dropdown-toggle mr-md-2" href="#" id="btncalendarios" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
        <i class="fas fa-calendar-alt"></i>
    </a>
    <div class="dropdown-menu dropdown-menu-right" aria-labelledby="bd-versions2">
        <a class="dropdown-item" href=" " >
            <i class="fas fa-calendar-plus"></i>  Insertar Nuevo Calendario (upload XLSM file)
        </a>
        <?php foreach($calendarios['calendario'] as $calendario) { ?>
            <a class="dropdown-item" href="<?php echo base_url(); ?>Descargar/?nombre_fichero=<?php echo $calendario; ?>  " >
                <i class="fas fa-calendar-alt"></i>  <?php echo $calendario; ?>
            </a>
        <?php }  ?>
    </div>
</li>

0 Answers0