Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openai_images
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
openai_images
Commits
f8c6c8d4
Commit
f8c6c8d4
authored
9 months ago
by
Martin Anderson-Clutz
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3399162
by hbdigit, mandclu: Error when generate variation (file_create_url)
parent
6ef79d12
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#174624
passed with warnings
9 months ago
Stage: build
Stage: validate
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Form/openaiImagesVariations.php
+2
-2
2 additions, 2 deletions
src/Form/openaiImagesVariations.php
with
2 additions
and
2 deletions
src/Form/openaiImagesVariations.php
+
2
−
2
View file @
f8c6c8d4
...
...
@@ -238,7 +238,7 @@ class openaiImagesVariations extends FormBase
$response
->
addCommand
(
new
ReplaceCommand
(
'#image-variation-preview-wrapper'
,
$image_variation_wrapper
));
// Enable the "Save Images" button.
// Enable the "Save Images" button.
$response
->
addCommand
(
new
InvokeCommand
(
'#edit-save-images'
,
'removeAttr'
,
[
'disabled'
]));
$response
->
addCommand
(
new
InvokeCommand
(
'#edit-save-images'
,
'removeClass'
,
[
'is-disabled'
]));
...
...
@@ -257,7 +257,7 @@ class openaiImagesVariations extends FormBase
$api_key
=
$this
->
config
(
'openai_images.settings'
)
->
get
(
'api_key'
);
// Read the image file and convert it to content.
$file_url
=
\Drupal
::
service
(
'file_
url_generator'
)
->
gener
at
e
(
$image_file
)
->
toString
()
;
$file_url
=
\Drupal
::
service
(
'file_
system'
)
->
realp
at
h
(
$image_file
);
$image_data
=
file_get_contents
(
$file_url
);
// Prepare the form data
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment