Upload, Resize and Save images with Intervention Image v3 in Laravel Storage. Test UploadedFile::fake() with real image file.
<form action="/upload/avatar" method="post" enctype="multipart/form-data">
@csrf
<label>Image</label>| import type { Attribute, Common, Utils } from '@strapi/types'; | |
| type IDProperty = { id: number }; | |
| type InvalidKeys<TSchemaUID extends Common.UID.Schema> = Utils.Object.KeysBy< | |
| Attribute.GetAll<TSchemaUID>, | |
| Attribute.Private | Attribute.Password | |
| >; | |
| export type GetValues<TSchemaUID extends Common.UID.Schema> = { |
| // In TS, interfaces are "open" and can be extended | |
| interface Date { | |
| /** | |
| * Give a more precise return type to the method `toISOString()`: | |
| * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString | |
| */ | |
| toISOString(): TDateISO; | |
| } | |
| type TYear = `${number}${number}${number}${number}`; |
You need to follow this procedure in order to share files between Windows 7 and Mac OS X on VMWare :
FFmpeg is a free and open source command line tool for transcoding multimedia files. It contains a set of shared audio and video libraries such as: libavcodec, libavformat, and libavutil. With this tool, you can convert between various video and audio formats, set sample rates and resize videos.
In this document will show you how to install a stable version and the latest version of FFmpeg. This instructions apply for any Ubuntu based distribution, including Linux Mint and Elementary OS.
In order to be able to add new repositories and install packages on your Ubuntu system, you must be logged in as a user with sudo privileges.
Задача:
*Добавить на страницах пагинации в title, description и h1 приписку с номером страницы
Решение:
*В bitrix/php_interface/init.php (если нет, то создаем) добавляем в конец функцию разбирающая мета-теги и собирающая обратно
Событие "OnEpilog" вызывается в конце визуальной части эпилога сайта. (После того как битрикс получит уже все данные страницы)
| if ('NodeList' in window && !NodeList.prototype.forEach) { | |
| console.info('polyfill for IE11'); | |
| NodeList.prototype.forEach = function (callback, thisArg) { | |
| thisArg = thisArg || window; | |
| for (var i = 0; i < this.length; i++) { | |
| callback.call(thisArg, this[i], i, this); | |
| } | |
| }; | |
| } |
| # Author: Zameer Ansari | |
| # You should look at the following URL's in order to grasp a solid understanding | |
| # of Nginx configuration files in order to fully unleash the power of Nginx. | |
| # http://wiki.nginx.org/Pitfalls | |
| # http://wiki.nginx.org/QuickStart | |
| # http://wiki.nginx.org/Configuration | |
| # | |
| # Generally, you will want to move this file somewhere, and start with a clean | |
| # file but keep this around for reference. Or just disable in sites-enabled. | |
| # |
| <IfModule mod_rewrite.c> | |
| RewriteEngine On | |
| # serves a .webp image instead of jpg/png | |
| RewriteCond %{HTTP_ACCEPT} image/webp | |
| RewriteCond %{REQUEST_FILENAME} ^(.+)\.(jpe?g|png)$ | |
| RewriteCond %1\.webp -f | |
| RewriteRule ^(.+)\.(jpe?g|png)$ $1.webp [T=image/webp,E=accept:1] | |
| </IfModule> |