Skip to content

Instantly share code, notes, and snippets.

@peterkraume
peterkraume / import-production-data
Created January 9, 2020 11:00
DDEV custom command for .ddev/commands/host
#!/bin/bash
## Description: Fetch and import production data
## Usage: import-production-data
## Example: "ddev import-production-data"
SSH_CREDENTIALS="user@domain.tld"
PRODUCTION_DB_USER="user"
PRODUCTION_DB_PASSWORD="pw"
@rajankur
rajankur / input_file.html
Created September 26, 2016 17:18
Valid Accept types for HTML input tag
<!-- Specifying multiple formats -->
<input type="file" accept=".csv, .txt" />
<!-- For CSV -->
<input type="file" accept=".csv" />
<!-- For Excel 97-2003 -->
<input type="file" accept="application/vnd.ms-excel" />
<!-- For Excel 2007+ -->
@xperseguers
xperseguers / controller.php
Last active April 4, 2023 07:56
Upload files in TYPO3 from Frontend
/**
* Upload files.
*
* @return void
*/
public function uploadAction() {
$overwriteExistingFiles = TRUE;
$data = array();
$namespace = key($_FILES);