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

Upload error #5

Open
RoffeDH opened this issue Dec 19, 2014 · 3 comments
Open

Upload error #5

RoffeDH opened this issue Dec 19, 2014 · 3 comments

Comments

@RoffeDH
Copy link

RoffeDH commented Dec 19, 2014

Here's the error message I get when trying to upload a video:

curl_setopt(): The usage of the @filename API for file uploading is deprecated. Please use the CURLFile class instead

And here's the code where the error is given from:

switch (strtoupper($this->method)) {
            case 'POST':
                curl_setopt($this->c, CURLOPT_POST, true);
                if ($data != null)
                    curl_setopt($this->c, CURLOPT_POSTFIELDS, $data);
                break;

It's highlighting the second to last line:

curl_setopt($this->c, CURLOPT_POSTFIELDS, $data);

Seems to me like the model is using the correct class, so what's the issue here?

@andheiberg
Copy link
Owner

I feel like I've fixed this issue before, but maybe never pushed it :( idk

Basically as the error says the current implementation is using a deprecated API.

I would say the ideal solution would be to change it to use Guzzle as this will take care of using different API's to maintain compatibility with multiple versions of PHP. I know I had a work in progress branch locally for that on my old computer, but it's been lost in the migration to my new machine.

Feel free to submit a pull request that fixes this issue though. At this point in time I won't be able to fix it.

@RoffeDH
Copy link
Author

RoffeDH commented Dec 22, 2014

I'm fairly new to Git so don't know how to do it or what that would mean.

@andheiberg
Copy link
Owner

You would fork my repo, make the necessary changes to your fork and send a pull request.

Sorry I don't know exactly what to tell you.

Hope you found a solution :-)

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

No branches or pull requests

2 participants