Version 4.1.2

This commit is contained in:
Neo committed 2025-12-19 05:32:19 -08:00
1 parent 3ba79295ee
commit 28bd025b35
1131 files changed
+63658 -20579

No files matched your search

+8 -2
View File
@@ -82,7 +82,6 @@ class _Url extends Text
$contentType = ( isset( $response->httpHeaders['Content-Type'] ) ) ? $response->httpHeaders['Content-Type'] : ( ( isset( $response->httpHeaders['content-type'] ) ) ? $response->httpHeaders['content-type'] : NULL );
if( $contentType )
{
foreach ( is_array( $this->options['allowedMimes'] ) ? $this->options['allowedMimes'] : array( $this->options['allowedMimes'] ) as $mime )
{
if ( preg_match( '/^' . str_replace( '~~', '.+', preg_quote( str_replace( '*', '~~', $mime ), '/' ) ) . '$/i', $contentType ) )
@@ -116,7 +115,14 @@ class _Url extends Text
}
}
$this->value = \IPS\File::create( $this->options['file'], $filename, $response );
try
{
$this->value = \IPS\File::create( $this->options['file'], $filename, $response );
}
catch( \InvalidArgumentException $e )
{
throw new \DomainException( 'form_url_error' );
}
}
}
catch ( \IPS\Http\Request\Exception $e )