1
0
Fork 0
mirror of synced 2024-06-15 01:04:51 +12:00

Apply suggestions from code review

Co-authored-by: Matej Bačo <matejbaco2000@gmail.com>
This commit is contained in:
Damodar Lohani 2022-01-16 13:01:06 +05:45 committed by GitHub
parent 7721a362a4
commit 30fdb9f66d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View file

@ -470,7 +470,7 @@ return [
],
[
'name' => '_APP_STORAGE_DEVICE_DO_SPACES_SECRET',
'description' => 'DigitalOcean spaces secret key. Required when the storage adapter is set to DoSpaces. You can get your secret key from your DigitalOcean console..',
'description' => 'DigitalOcean spaces secret key. Required when the storage adapter is set to DoSpaces. You can get your secret key from your DigitalOcean console.',
'introduction' => '0.13.0',
'default' => '',
'required' => true,
@ -478,7 +478,7 @@ return [
],
[
'name' => '_APP_STORAGE_DEVICE_DO_SPACES_REGION',
'description' => 'DigitalOcean spaces region. Required when storage adapter is set to DoSpaces. You can find your region info for your space from DigitalOcean console..',
'description' => 'DigitalOcean spaces region. Required when storage adapter is set to DoSpaces. You can find your region info for your space from DigitalOcean console.',
'introduction' => '0.13.0',
'default' => 'us-eas-1',
'required' => false,

View file

@ -500,7 +500,7 @@ App::post('/v1/functions/:functionId/tags')
throw new Exception('Invalid content-range header', 400);
}
if ($end == $fileSize) {
if ($end === $fileSize) {
//if it's a last chunks the chunk size might differ, so we set the $chunks and $chunk to notify it's last chunk
$chunks = $chunk = -1;
} else {
@ -537,7 +537,7 @@ App::post('/v1/functions/:functionId/tags')
throw new Exception('Failed moving file', 500);
}
if($chunksUploaded == $chunks) {
if($chunksUploaded === $chunks) {
$fileSize = $deviceFunctions->getFileSize($path);
if ($tag->isEmpty()) {

View file

@ -4,4 +4,4 @@ Larger files should be uploaded using multiple requests with the [content-range]
When the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-upload-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.
If you're creating a new file using one the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.
If you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.