Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

select files from server only for photos. all other types are ignored. #2136

Closed
fidelio314 opened this issue Nov 8, 2014 · 0 comments
Closed
Labels
bug A bug that has been verified

Comments

@fidelio314
Copy link

Hello,
when selecting a file or photo from server, only photos are available.

i found the where this happens.

I do not know if it was made in purpose.

/home/fidelio/freelance/we/app/view/twig/files_async/files_async.twig
line: 52 only type jpeg, jpg, png ang gif are permitted.

would it be better to user the config param: accept_file_types

          {% for file in context.files %}
                {% if file.type in ['jpeg', 'jpg', 'png', 'gif'] %}
                    <tr>
                        <td>

                            <i class="fa fa-fw fa-file-image-o"></i>

                            {% if file.readable %}
                                <a href="#" data-action="bolt.stack.selectFromPulldown('{{ context.key }}', '{{ file.relativepath }}');" class='file'>
                                    <b>{{ file.filename|trimtext(30) }}</b>
                                </a>
                            {% else %}
                                <b>{{ file.filename|trimtext(30) }} </b><i class="fa fa-lock"></i>
                            {% endif %}
                        </td>

                        <td>{{ file.filesize }}.</td>

                        <td>{% if file.imagesize is defined %}{{ file.imagesize }} px.{% endif %}</td>

                        <td class='listthumb'>
                                {{file.newpath|showimage(54, 40, 'c')}}
                        </td>

                        {# <td>
                            <a href="{{ file.newpath|thumbnail(1000, 1000, 'r') }}" class="btn btn-small preview magnific" title="Image: {{ file.filename }}">
                            {{ __('Preview') }}</a>
                        </td> #}
                    </tr>
                {% endif %}
            {% endfor %}

Then we should adapt the thumb issue. According to type show a thumb. pdf, video etc.

sorry i just started discovering bolt. just not ready yet for a pull request.

thanks

@bobdenotter bobdenotter added blocking release bug A bug that has been verified and removed blocking release labels Nov 8, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug that has been verified
Projects
None yet
Development

No branches or pull requests

2 participants