Forum

Thread tagged as: Question, Problem, Blog

Having trouble adding video files to my site using type="file"

I'm currently creating a blog which requires a video in each post so I'm creating the template to include this - below is the video specific code I have so far...

<div class="video_upload">
      <video width="320" height="240" controls>
      <source src="<perch:blog id="video_MP" type="file" label="Video MPFour" />" type="video/mp4">
      <source src="<perch:blog id="video_OGG" type="file" label="Video Ogg" />" type="video/ogg">
            Your browser does not support the video tag.
      </video>
</div>

This has created the 2 required file upload inputs in my admin however when I click to add the videos as assets it seems to upload them and then I can't select the files to use for that field...

The 2 video files .mp4 and .ogv are currently 2.1mb and 988kb respectively.

Can anyone see where I am going wrong here?

Thank you in advance

David Springate

David Springate 0 points

  • 7 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

Are the video files uploaded to your resources folder?

Can we see your Diagnostics Report, please?

Thanks Rachel, yes, they have been added to my perch resources folder.

Here is my full diagnostics report...

Perch: 2.6.4
Production mode: Production (100)
Installed apps: content (2.6.4), assets (2.6.4), categories (2.6.4), perch_blog (4.1)
DB driver: PDO
DB tables: perch2_blog_authors, perch2_blog_categories, perch2_blog_comments, perch2_blog_posts, perch2_blog_posts_to_categories, perch2_blog_posts_to_tags, perch2_blog_sections, perch2_blog_tags, perch2_categories, perch2_category_counts, perch2_category_sets, perch2_content_index, perch2_content_items, perch2_content_regions, perch2_navigation, perch2_navigation_pages, perch2_page_templates, perch2_pages, perch2_resource_log, perch2_resource_tags, perch2_resources, perch2_resources_to_tags, perch2_settings, perch2_user_privileges, perch2_user_role_privileges, perch2_user_roles, perch2_users
Users: 1
App runtimes:
<?php
    $apps_list = array(
        'content', 
        'categories',
        'perch_blog',
    );
Scheduled tasks for perch_blog: delete_spam_comments (1440 mins)
Editor plug-ins: markitup
H1: 421aa90e079fa326b6494f812ad13e79
L1: 84d1a2091afe81189051f2c526c80e56
headerColour: #ffffff
content_singlePageEdit: 1
helpURL:
hideBranding: 1
content_collapseList: 1
lang: en-gb
update_2.6.4: done
latest_version: 2.5.3
on_sale_version: 2.6.5
perch_blog_post_url: post.php?s={postSlug}
perch_blog_update: 4.0
headerScheme: light
perch_blog_slug_format: %Y-%m-%d-{postTitle}
perch_blog_akismet_key:
perch_blog_max_spam_days: 0
dashboard: 0
hide_pwd_reset: 0
content_hideNonEditableRegions: 0
content_frontend_edit: 0
perch_blog_comment_notify: 0
siteURL: /
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_DB_USERNAME: root
PERCH_DB_SERVER: localhost
PERCH_DB_DATABASE: perch_mobile
PERCH_DB_PREFIX: perch2_
PERCH_TZ: UTC
PERCH_EMAIL_FROM: info@hatchinc.co
PERCH_EMAIL_FROM_NAME: David Springate
PERCH_LOGINPATH: /mobile/perch
PERCH_PATH: /Applications/MAMP/htdocs/mobile/perch
PERCH_CORE: /Applications/MAMP/htdocs/mobile/perch/core
PERCH_RESFILEPATH: /Applications/MAMP/htdocs/mobile/perch/resources
PERCH_RESPATH: /mobile/perch/resources
PERCH_HTML5: 1
PERCH_RUNWAY:
PERCH_ERROR_MODE: DIE
PERCH_DATE_LONG: %d %B %Y
PERCH_DATE_SHORT: %d %b %Y
PERCH_TIME_SHORT: %H:%M
PERCH_TIME_LONG: %H:%M:%S
PERCH_DEBUG:
PERCH_PREVIEW_ARG: preview
PERCH_TEMPLATE_PATH: /Applications/MAMP/htdocs/mobile/perch/templates
PERCH_DEFAULT_DOC: index.php
PERCH_DEFAULT_EXT: .php
PERCH_PRODUCTION_MODE: 100
PERCH_RWD:
PERCH_HTML_ENTITIES:
PERCH_SSL:
PERCH_AUTH_PLUGIN:
PERCH_DB_CHARSET: utf8
PERCH_DB_PORT:
PERCH_DB_SOCKET:
HOSTING SETTINGS

PHP: 5.3.6
Zend: 2.3.0
OS: Darwin
SAPI: apache2handler
Safe mode: not detected
MySQL client: 5.5.9
MySQL server: 5.5.9
Extensions: Core, date, ereg, libxml, openssl, pcre, sqlite3, zlib, bcmath, bz2, calendar, ctype, curl, dom, hash, fileinfo, filter, ftp, gd, SPL, iconv, json, ldap, mbstring, mysql, mysqli, session, PDO, pdo_sqlite, standard, posix, Reflection, Phar, SimpleXML, soap, sockets, SQLite, exif, tokenizer, xml, xmlreader, xmlwriter, xsl, zip, apache2handler, imap, yaz, mcrypt, gettext, pgsql, pdo_pgsql, pdo_mysql, XCache
GD: Yes
ImageMagick: No
PHP max upload size: 32M
PHP max form post size: 32M
PHP memory limit: 32M
Total max uploadable file size: 32M
Resource folder writeable: Yes
Session timeout: 24 minutes
Native JSON: Yes
Filter functions: Yes
Transliteration functions: No
HTTP_HOST: localhost
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_CONNECTION: keep-alive
HTTP_COOKIE: cmsa=1; PHPSESSID=73baa319b8f2ed6743dc4df4a484f69f; SQLiteManager_currentLangue=2
HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.75.14 (KHTML, like Gecko) Version/7.0.3 Safari/537.75.14
HTTP_ACCEPT_LANGUAGE: en-us
HTTP_REFERER: https://localhost/mobile/perch/core/settings/diagnostics/
HTTP_ACCEPT_ENCODING: gzip, deflate
PATH: /usr/bin:/bin:/usr/sbin:/sbin
SERVER_SOFTWARE: Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8y DAV/2 PHP/5.3.6
SERVER_NAME: localhost
SERVER_ADDR: ::1
SERVER_PORT: 80
REMOTE_ADDR: ::1
DOCUMENT_ROOT: /Applications/MAMP/htdocs
SERVER_ADMIN: you@example.com
SCRIPT_FILENAME: /Applications/MAMP/htdocs/mobile/perch/core/settings/diagnostics/index.php
REMOTE_PORT: 53867
GATEWAY_INTERFACE: CGI/1.1
SERVER_PROTOCOL: HTTP/1.1
REQUEST_METHOD: GET
QUERY_STRING: extended
REQUEST_URI: /mobile/perch/core/settings/diagnostics/?extended
SCRIPT_NAME: /mobile/perch/core/settings/diagnostics/index.php
PHP_SELF: /mobile/perch/core/settings/diagnostics/index.php
REQUEST_TIME: 1411038359
argc: 1
Drew McLellan

Drew McLellan 2638 points
Perch Support

Do the videos appear inside the Assets app?

So I click to 'select or upload a file' then on adding an asset i've tried both dragging the file into the box and also clicking and selecting it from my files.

When I select the file I want to add it sort of uploads it and then the assets disappear from view. So from there I tried clicking 'add an asset' again and they appear but they aren't selectable. Visually they are showing up in the assets app with a grey box within a white frame with a green strip along the bottom and the file size of the asset.

Any idea whats wrong here?

Thanks

Drew McLellan

Drew McLellan 2638 points
Perch Support

As far as I can tell, nothing. If you use the filter for video, can you see them listed?

You'll only get video thumbnails if you have imagick and ffmpeg correctly configured.