Files uploaded with Safari on iOS 7 fail or result in 0 kilobyte files on the server.
- Using any device running iOS 7
- Browsing from Safari or Chrome
- When using a multiple-upload form (even if only one file is uploaded)
| @echo off | |
| echo ____ _____ ______ _________ ________ ______ ______ | |
| echo /___/\ /_____/\ /_____/\ /________/\/_______/\ /_____/\ /_____/\ | |
| echo \_::\ \ \:::_:\ \ \::::_\/_\__.::.__\/\::: _ \ \\:::_ \ \ \::::_\/_ | |
| echo \::\ \ _\:\^| \:\/___/\ \::\ \ \::(_) \ \\:(_) ) )_\:\/___/\ | |
| echo _\: \ \__ /::_/__ \_::._\:\ \::\ \ \:: __ \ \\: __ `\ \\_::._\:\ | |
| echo /__\: \__/\\:\____/\ /____\:\ \::\ \ \:.\ \ \ \\ \ `\ \ \ /____\:\ | |
| echo \________\/_\_____\/_____\_____\/__ \__\/___ \__\/\__\/ \_\/ \_\/ \_____\/ | |
| echo. |
Access-Control-Allow-Headers should be set to "*" only for OPTIONS requests. If you return it for POST requests Chrome will cancel the request.
Works for GET preflight: Access-Control-Allow-Origin: {origin} Access-Control-Allow-Methods: GET, POST, PUT, DELETE Access-Control-Allow-Headers: Authorization, Content-Type
| <?php namespace Acme\V1\Handlers; | |
| use Acme\V1\Eventing\EventListener; | |
| use Acme\V1\Eventing\Events\AssetHasBeenUploaded; | |
| use Acme\V1\Eventing\Events\ProductionHasBeenUploaded; | |
| use Illuminate\Queue\QueueInterface as Queue; | |
| class EncodeListener extends EventListener { | |
| protected $queue; |
| <!doctype html> | |
| <html class="no-js" lang=""> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="x-ua-compatible" content="ie=edge"> | |
| <title>Direct Employers Tests - Tim Loyer</title> | |
| <meta name="description" content=""> | |
| <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
| </head> |
| def print_runtime(func): | |
| """ | |
| Decorator to log the name and runtime in seconds for a callable. | |
| :param func: | |
| :return: | |
| """ | |
| def wrapper(*args, **kwargs): | |
| start = timer() |
| class ProgressBar: | |
| def __init__(self, total_items=None, title="Progress", bar_length=60): | |
| self.title = title | |
| self.bar_length = bar_length | |
| self.total_items = total_items | |
| self.start_time = timer() | |
| self.is_tty = isatty(sys.stdin.fileno()) | |
| def get_time_elapsed(self): | |
| elapsed = timer() - self.start_time |
| def wrap_log_output(message: str, line_char: str = "#", log: logger = logger.info): | |
| if not isatty(sys.stdin.fileno()): | |
| log(message) | |
| else: | |
| _, columns = subprocess.check_output(["stty", "size"]).split() | |
| def hr(): | |
| print(line_char * int(columns)) | |
| hr() |
| #!/bin/bash | |
| #description :This script will make a header for a bash script. | |
| #usage :tf plan -exclude=route53 -exclude=s3 | |
| #requirements :Install Terraform | |
| get_local_state() { | |
| # List all Terraform resource, data, and module objects in a directory. | |
| # Note: This ignores 'module' objects! | |
| state="$(grep -rho --include="*.tf" -E "^(resource|data).*\"" .)" |
| #!/bin/bash | |
| #description : Set MFA session in environment variables | |
| #usage : source mfa-env [token-from-mfa-device] | |
| #requirements : Install aws-cli v2 | |
| mfa_config=~/.aws/mfa | |
| mfa_device_arn="" | |
| mfa_token="${1-}" | |
| if [ ! -f $mfa_config ]; then |