Unable to upload file due to "Invalid object name 'media'" error #3017
Unanswered
mburkeSencon
asked this question in
Q&A
Replies: 1 comment
-
Answered #3024 (comment)
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This may be a bug, but I've not seen any references to this error so I'll write it like a bug report and it can be moved if required.
Background
I have upgraded a Laravel project from 6 through to 9, which also meant upgrading Spatie Activity Log and Media Library incrementally. The server runs a new version of Ubuntu (Ubuntu 22), PHP 8.1 and the database is MSSQL.
What I did
Part of testing involved uploading a file to part of the software. This software was initially written and developed in Laravel 6. I took two files (a 7MB PDF file, and a 2b text file) and tried to upload these individually to the system.
What I expected to happen
I expected the file to upload like it did before, pre-upgrade.
What happened
A whole world of pain and anguish descended upon me.
I mentioned two files were used. All of this started with a 7MB PDF file. Using the 7MB file returned an initial error of:
Then performing:
dd($request->files->get('media')->getErrorMessage())
within the controller responsible for uploading the file returned (initially) that the file had only been partially uploaded. That's all the error I could get at that time.
I since found elsewhere that using a smaller file could make a difference in terms of troubleshooting, so I then decided to upload a 2 byte file. This returned a different error altogether.
The table exists.
It's at this point I'm stuck. I'm not sure if it's a bug or not, but I know for myself personally I've spent all day with this and haven't got anywhere with it.
Beta Was this translation helpful? Give feedback.
All reactions