This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import AVFoundation | |
import Photos | |
import Alamofire | |
class ViewController: UIViewController, UIImagePickerControllerDelegate, UINavigationControllerDelegate { | |
let imagePicker = UIImagePickerController() | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$file_path = "/full/path/of/the/file.doc"; | |
if ( file_exists($file_path) ) { | |
$file_name = basename($file_path); | |
$mime_type = mime_content_type($file_path); | |
$file_size = filesize($file_path); | |
header('Content-Description: File Transfer'); | |
header("Content-Type: {$mime_type}"); | |
header("Content-Disposition: attachment; filename=\"{$file_name}\""); |