Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfbffbc8

Browse files
committed
fix: pong response & chunked upload
1 parent34dd905 commitfbffbc8

File tree

12 files changed

+70
-35
lines changed

12 files changed

+70
-35
lines changed

‎LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c)2024 Appwrite (https://appwrite.io) and individual contributors.
1+
Copyright (c)2025 Appwrite (https://appwrite.io) and individual contributors.
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

‎docs/functions.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,8 @@ DELETE https://cloud.appwrite.io/v1/functions/{functionId}/deployments/{deployme
215215
POST https://cloud.appwrite.io/v1/functions/{functionId}/deployments/{deploymentId}/build
216216
```
217217

218+
** Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.**
219+
218220
###Parameters
219221

220222
| Field Name| Type| Description| Default|
@@ -229,6 +231,8 @@ POST https://cloud.appwrite.io/v1/functions/{functionId}/deployments/{deployment
229231
PATCH https://cloud.appwrite.io/v1/functions/{functionId}/deployments/{deploymentId}/build
230232
```
231233

234+
** Cancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status'ready') or failed. The response includes the final build status and details.**
235+
232236
###Parameters
233237

234238
| Field Name| Type| Description| Default|

‎docs/messaging.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ POST https://cloud.appwrite.io/v1/messaging/messages/sms
157157
PATCH https://cloud.appwrite.io/v1/messaging/messages/sms/{messageId}
158158
```
159159

160-
** Update anemail message by its unique ID.
160+
** Update anSMS message by its unique ID.
161161
**
162162

163163
###Parameters

‎src/Appwrite/Client.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ class Client
3737
*/
3838
protectedarray$headers = [
3939
'content-type' =>'',
40-
'user-agent' =>'AppwritePHPSDK/12.2.0 ()',
40+
'user-agent' =>'AppwritePHPSDK/12.2.1 ()',
4141
'x-sdk-name'=>'PHP',
4242
'x-sdk-platform'=>'server',
4343
'x-sdk-language'=>'php',
44-
'x-sdk-version'=>'12.2.0',
44+
'x-sdk-version'=>'12.2.1',
4545
];
4646

4747
/**

‎src/Appwrite/Enums/ImageFormat.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ class ImageFormat implements JsonSerializable
1111
privatestaticImageFormat$GIF;
1212
privatestaticImageFormat$PNG;
1313
privatestaticImageFormat$WEBP;
14+
privatestaticImageFormat$HEIC;
1415
privatestaticImageFormat$AVIF;
1516

1617
privatestring$value;
@@ -65,6 +66,13 @@ public static function WEBP(): ImageFormat
6566
}
6667
returnself::$WEBP;
6768
}
69+
publicstaticfunctionHEIC():ImageFormat
70+
{
71+
if (!isset(self::$HEIC)) {
72+
self::$HEIC =newImageFormat('heic');
73+
}
74+
returnself::$HEIC;
75+
}
6876
publicstaticfunctionAVIF():ImageFormat
6977
{
7078
if (!isset(self::$AVIF)) {

‎src/Appwrite/Services/Account.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,9 +441,9 @@ public function createMfaChallenge(AuthenticationFactor $factor): array
441441
* @param string $challengeId
442442
* @param string $otp
443443
* @throws AppwriteException
444-
* @returnstring
444+
* @returnarray
445445
*/
446-
publicfunctionupdateMfaChallenge(string$challengeId,string$otp):string
446+
publicfunctionupdateMfaChallenge(string$challengeId,string$otp):array
447447
{
448448
$apiPath =str_replace(
449449
[],

‎src/Appwrite/Services/Functions.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ public function createDeployment(string $functionId, InputFile $code, bool $acti
570570
'progress' =>min(((($counter * Client::CHUNK_SIZE) + Client::CHUNK_SIZE)),$size) /$size *100,
571571
'sizeUploaded' =>min($counter * Client::CHUNK_SIZE),
572572
'chunksTotal' =>$response['chunksTotal'],
573-
'chunksUploaded' =>$response['chunksUploaded'],
573+
'chunksUploaded' =>$response['chunksUploaded'],
574574
]);
575575
}
576576
}
@@ -685,6 +685,12 @@ public function deleteDeployment(string $functionId, string $deploymentId): stri
685685
/**
686686
* Rebuild deployment
687687
*
688+
* Create a new build for an existing function deployment. This endpoint
689+
* allows you to rebuild a deployment with the updated function configuration,
690+
* including its entrypoint and build commands if they have been modified The
691+
* build process will be queued and executed asynchronously. The original
692+
* deployment's code will be preserved and used for the new build.
693+
*
688694
* @param string $functionId
689695
* @param string $deploymentId
690696
* @param ?string $buildId
@@ -721,6 +727,12 @@ public function createBuild(string $functionId, string $deploymentId, ?string $b
721727
/**
722728
* Cancel deployment
723729
*
730+
* Cancel an ongoing function deployment build. If the build is already in
731+
* progress, it will be stopped and marked as canceled. If the build hasn't
732+
* started yet, it will be marked as canceled without executing. You cannot
733+
* cancel builds that have already completed (status 'ready') or failed. The
734+
* response includes the final build status and details.
735+
*
724736
* @param string $functionId
725737
* @param string $deploymentId
726738
* @throws AppwriteException

‎src/Appwrite/Services/Messaging.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ public function createSms(string $messageId, string $content, ?array $topics = n
526526
/**
527527
* Update SMS
528528
*
529-
* Update anemail message by its unique ID.
529+
* Update anSMS message by its unique ID.
530530
*
531531
*
532532
* @param string $messageId

‎src/Appwrite/Services/Storage.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -385,12 +385,10 @@ public function createFile(string $bucketId, string $fileId, InputFile $file, ?a
385385
$id ='';
386386
$counter =0;
387387

388-
if($fileId !='unique()') {
389-
try {
390-
$response =$this->client->call(Client::METHOD_GET,$apiPath .'/' .$fileId);
391-
$counter =$response['chunksUploaded'] ??0;
392-
}catch(\Exception$e) {
393-
}
388+
try {
389+
$response =$this->client->call(Client::METHOD_GET,$apiPath .'/' .$fileId);
390+
$counter =$response['chunksUploaded'] ??0;
391+
}catch(\Exception$e) {
394392
}
395393

396394
$apiHeaders = ['content-type' =>'multipart/form-data'];
@@ -426,7 +424,7 @@ public function createFile(string $bucketId, string $fileId, InputFile $file, ?a
426424
'progress' =>min(((($counter * Client::CHUNK_SIZE) + Client::CHUNK_SIZE)),$size) /$size *100,
427425
'sizeUploaded' =>min($counter * Client::CHUNK_SIZE),
428426
'chunksTotal' =>$response['chunksTotal'],
429-
'chunksUploaded' =>$response['chunksUploaded'],
427+
'chunksUploaded' =>$response['chunksUploaded'],
430428
]);
431429
}
432430
}

‎src/Appwrite/Services/Users.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -790,9 +790,9 @@ public function updateMfa(string $userId, bool $mfa): array
790790
* @param string $userId
791791
* @param AuthenticatorType $type
792792
* @throws AppwriteException
793-
* @returnarray
793+
* @returnstring
794794
*/
795-
publicfunctiondeleteMfaAuthenticator(string$userId,AuthenticatorType$type):array
795+
publicfunctiondeleteMfaAuthenticator(string$userId,AuthenticatorType$type):string
796796
{
797797
$apiPath =str_replace(
798798
['{userId}','{type}'],

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp