9
									
								
								ufw
									
									
									
									
									
								
							
							
						
						
									
										9
									
								
								ufw
									
									
									
									
									
								
							| @@ -31,6 +31,7 @@ usage() { | ||||
| 		        -u                   # Generate a shortlink from URL. | ||||
| 		        -m                   # Maximum filesize (takes K, M and G suffixes). | ||||
| 		        -a                   # Add the file to an album. | ||||
| 		        -A                   # API response format. | ||||
| 		 | ||||
| 		    Config options (~/.config/ufw): | ||||
| 		        secret               # Your personal token. Get it at https://zfh.so/settings_form | ||||
| @@ -112,14 +113,14 @@ upload() { | ||||
|  | ||||
| 	curl -sL \ | ||||
| 		-F file="@$file" \ | ||||
| 		-F upload_mode='api' \ | ||||
| 		-F api_format="$cfg_api_format" \ | ||||
| 		-F flag_private="$flag_private" \ | ||||
| 		-F short="$flag_shortlink" \ | ||||
| 		-F secret="$secret" \ | ||||
| 		-F submit="" \ | ||||
| 		"${misc_curl_args[@]}" \ | ||||
| 		-A 'zerofiles.org upload script' \ | ||||
| 		"$cfg_service_url/upload" | ||||
| 		"$cfg_service_url/$cfg_api_path/upload" | ||||
|  | ||||
| 	if (( $? )); then | ||||
| 		err 'Something has gone wrong with the upload.' | ||||
| @@ -238,6 +239,8 @@ main() { | ||||
| 	cfg_service_url='https://8fw.me' | ||||
| 	cfg_screenshot_ext='png' | ||||
| 	cfg_max_filesize='200M' | ||||
| 	cfg_api_format='plain' | ||||
| 	cfg_api_path='/api/2' | ||||
|  | ||||
| 	if [[ -f "$HOME/.suprc" ]]; then | ||||
| 		printf 'Found legacy configfile, moving...\n' >&2 | ||||
| @@ -263,6 +266,8 @@ main() { | ||||
| 				flag_scrot_fullscreen='1' | ||||
| 			;; | ||||
|  | ||||
| 			-A|--api-format) cfg_api_format=$2; shift;; | ||||
|  | ||||
| 			-i|--my-ip) action='getmyip';; | ||||
|  | ||||
| 			-S|--short) flag_shortlink='1';; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user