Skip to content

feat: php multiparts #940

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Aug 30, 2024
Merged

feat: php multiparts #940

merged 15 commits into from
Aug 30, 2024

Conversation

byawitz
Copy link
Member

@byawitz byawitz commented Aug 14, 2024

What does this PR do?

Changes createExecution to send and parse multipart data

Code example 👇

<?php

use Appwrite\Client;
use Appwrite\Payload;
use Appwrite\Services\Functions;

$client = (new Client())
    ->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
    ->setProject('&lt;YOUR_PROJECT_ID&gt;') // Your project ID
    ->setSession(''); // The user session to authenticate with

$functions = new Functions($client);

$result = $functions->createExecution(
    functionId: '<FUNCTION_ID>',
    body: Payload::fromJson([]), // optional
    async: false, // optional
    path: '<PATH>', // optional
    method: ExecutionMethod::GET(), // optional
    headers: '', // optional
    scheduledAt: '' // optional
);

Test Plan

image


public function toBinary(): string
{
return $this->data;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is binary represented as a string in PHP? is there no other data type like a buffer or uint8 array or something?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a string, yes

@byawitz byawitz changed the base branch from master to feat-multipart August 30, 2024 14:41
…ltiparts

# Conflicts:
#	mock-server/app/http.php
#	mock-server/src/Utopia/Response.php
#	tests/resources/spec.json
@christyjacob4 christyjacob4 merged commit f514c62 into feat-multipart Aug 30, 2024
7 of 34 checks passed
@christyjacob4 christyjacob4 deleted the feat-php-multiparts branch August 30, 2024 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants