Skip to content
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

PHP File Upload improvements #460

Merged
merged 8 commits into from
Jun 22, 2022
Merged

PHP File Upload improvements #460

merged 8 commits into from
Jun 22, 2022

Conversation

lohanidamodar
Copy link
Member

No description provided.

} else {
$chunk = substr($file->getData(), $start, Client::CHUNK_SIZE);
}
$params['{{ parameter.name }}'] = new \CURLFile('data://' . $mimeType . ';base64,' . base64_encode($chunk), $mimeType, $postedName);
Copy link
Member

Choose a reason for hiding this comment

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

Is there any way we can avoid base64 encoding each chunk?

Copy link
Member Author

Choose a reason for hiding this comment

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

We can drop later when we only support PHP 8.1 and above

tests/languages/php/test.php Show resolved Hide resolved
templates/php/src/Services/Service.php.twig Outdated Show resolved Hide resolved
templates/php/src/InputFile.php.twig Show resolved Hide resolved
Copy link
Contributor

@Meldiron Meldiron left a comment

Choose a reason for hiding this comment

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

LGTM

@lohanidamodar lohanidamodar merged commit dfe67ab into master Jun 22, 2022
@lohanidamodar lohanidamodar deleted the feat-php-input-file branch June 22, 2022 04:22
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.

3 participants