Version 4.7.8

This commit is contained in:
Neo committed 2025-12-19 16:10:42 -08:00
1 parent 7b7404e741
commit fd22d99e69
688 files changed
+19814 -10890

No files matched your search

@@ -34,7 +34,7 @@ class _UploadAttachment
/*
* Mutation arguments
*/
public function args()
public function args(): array
{
return [
'name' => TypeRegistry::nonNull( TypeRegistry::string() ),
@@ -89,7 +89,7 @@ class _UploadAttachment
{
if( !\in_array( mb_strtolower( $ext ), array_map( 'mb_strtolower', $allowedFileTypes ) ) )
{
throw new \IPS\Api\GraphQL\SafeException( 'FILE_TYPE_NOT_ALLOWED', '2C399/1', 403 );
throw new \IPS\Api\GraphQL\SafeException( 'FILE_TYPE_NOT_ALLOWED', '2C399/1_graphql', 403 );
}
}
@@ -112,8 +112,7 @@ class _UploadAttachment
/* If this is the LAST chunk, finish the process */
if ( $args['chunk'] === $args['totalChunks'] )
{
$url = $storageClass->chunkFinish( $ref );
$file = \IPS\File::get( 'core_Attachment', $url );
$file = $storageClass->chunkFinish( $ref, 'core_Attachment' );
/* If it's got an image extension, check it's actually a valid image */
if ( \in_array( $ext, \IPS\Image::supportedExtensions() ) )
@@ -124,7 +123,7 @@ class _UploadAttachment
}
catch ( \Exception $e )
{
throw new \IPS\Api\GraphQL\SafeException( 'NOT_VALID_IMAGE', '2C399/2', 403 );
throw new \IPS\Api\GraphQL\SafeException( 'NOT_VALID_IMAGE', '2C399/2_graphql', 403 );
}
}
}
@@ -150,7 +149,7 @@ class _UploadAttachment
}
catch ( \InvalidArgumentException $e )
{
throw new \IPS\Api\GraphQL\SafeException( $e->getMessage(), '2C399/2', 403 );
throw new \IPS\Api\GraphQL\SafeException( $e->getMessage(), '2C399/2_graphql', 403 );
}
}
@@ -161,7 +160,7 @@ class _UploadAttachment
}
catch ( \Exception $e )
{
throw new \IPS\Api\GraphQL\SafeException( 'FILE_CREATION_FAILED', '2C399/3', 403 );
throw new \IPS\Api\GraphQL\SafeException( 'FILE_CREATION_FAILED', '2C399/3_graphql', 403 );
}
}