-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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
Unable to insert resource (stream) into table for MySQL, or SQLite database #41180
Comments
I think we'd be open to also implement this for other engines. Can you send a PR? Thanks |
Hi @driesvints I can try. Could you please answer the following:
|
Think the first one. For 9.x because 8.x is closed for new features. |
Alright then - I'll get started as soon as time permits it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description:
When attempting to store a large file into a database table, e.g. a large photo, the database
Connection
does not bind aresource
correctly, for MySQL and SQLite. Yet, for Postgresql it works?Steps To Reproduce:
The above example works when using Postgres connection.
Cause
The
\Illuminate\Database\Connection::bindValues()
method does not handle values of the typeresource
. Yet, the\Illuminate\Database\PostgresConnection
does.Code from
PostgresConnection
Possible Solution
Update the
\Illuminate\Database\Connection::bindValues()
to handle values of typeresource
.Alternative Solution
Perhaps allow specifying a callback that allows developers to define how values should be bound to PDO statement, in
Connection
.E.g.
If this solution should be chosen, then developers are free to resolve their PDO bindings, however they see fit :)
The text was updated successfully, but these errors were encountered: