public function upload( $file, $text = '', $comment = '', $watch = null, $ignorewarnings = true, $async = false ) {
		global $pgIP, $pgNotag, $pgTag;

		if( !$pgNotag ) $comment .= $pgTag;
		if( !is_array( $file ) ) {
			if( !preg_match( '@((http(s)?:\/\/)?([-\w]+\.[-\w\.]+)+\w(:\d+)?(/([-\w/_\.]*(\?\S+)?)?)*)@', $file ) ) {
				if( !is_file( $file ) ) {

					if( is_file( $pgIP . 'Images/' . $file ) ) {
						$file = $pgIP . 'Images/' . $file;
					}

					if( !is_file( $file ) ) {
						throw new BadEntryError( "FileNotFound", "The given file, or file chunks, was not found or an invalid URL was specified." );
					}
				}
			}
			pecho( "Uploading $file to {$this->title}..\n\n", PECHO_NOTICE );
		} else {
			$i = 0;
			foreach( $file as $chunk ){
				if( !is_file( $chunk ) ) {

					if( is_file( $pgIP . 'Images/' . $chunk ) ) {
						$file[$i] = $pgIP . 'Images/' . $chunk;
					}

					if( !is_file( $file[$i] ) ) {
						throw new BadEntryError( "FileNotFound", "The given chunk file was not found." );
					}
				}
				$i++;
			}
			pecho( "Uploading chunk files to {$this->title}..\n\n", PECHO_NOTICE );
		}

		try{
			$this->preEditChecks( "Uploads" );
		} catch( EditError $e ){
			pecho( "Error: $e\n\n", PECHO_FATAL );
			return false;
		}

		return $this->api_upload( $file, $text, $comment, $watch, $ignorewarnings, $async );

	}