• Hello! I discovered a problem today when I first tried to upload a file larger than 15mb, it uploads perfectly to Spaces of Digital Ocean but does not generate the URL of the file well, this does not happen when uploading files that are below 15mb, which may be happening?

    For example if I upload a 5mb file the URL is generated correctly, for example:

    [audio src="https://mybucket.nyc3.digitaloceanspaces.com/2017/10/music.mp3" /]

    But if I upload a file larger than 15mb the URL is formed like this:

    mybucket.nyc3.digitaloceanspaces.com

    Without the http: // nor the directory of the file. What it does is to upload it perfectly, but it does not generate the route well. Will I be doing something wrong?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author interfacelab

    (@interfacelab)

    Can you turn on the debugger, insure you have php logging enabled and logging to a file and then paste the output after trying to upload the big file again?

    Thanks,

    Jon.

    Thread Starter chrislan21

    (@chrislan21)

    Hello! I apologize, but I do not have much knowledge in programming tools, tell me if I’m doing well: Run the debugger in Firefox, try uploading the large file and in the tab “console” jumped the following error:

    File.lastModifiedDate is deprecated. Use File.lastModified instead.

    If I am doing something wrong please I ask you to tell me step by step how I perform the test to correct the bug, greetings!

    Thread Starter chrislan21

    (@chrislan21)

    Hello! forgive me for bothering you again. Did you refer to the browser’s debugger or the one inside the plugin? I do not know how to use it, if you tell me how to do it, I will do it, still the mistake follows, thank you very much!

    Hey there,

    I just wanted to confirm this behavior. The PHP logging produces this error when uploading a larger file (I haven’t tried to confirm the specific file size boundary, but I’ll take chrislan21’s word for it):

    [31-Oct-2017 17:08:53 UTC] PHP Warning: fclose(): supplied resource is not a valid stream resource in /var/www/html/wp-content/plugins/ilab-media-tools/classes/Cloud/Storage/Driver/S3/S3Storage.php on line 461

    I hope that helps with the debugging. Let me know if you’d like some other information or if you’d like me to test a fix.

    I found that the objectURL is being set incorrectly in ilab-media-tools/vendor/ilab/ilab-aws-media-cloud-sdk/src/S3/PutObjectURIMiddleware.php, in the case of DigitalOcean. Anyway, changing the source of the ObjectURL under the ‘CompleteMultipartUpload’ case works for me on DigitalOcean spaces:

    switch ($name) {
                        case 'PutObject':
                        case 'CopyObject':
                            $result['ObjectURL'] = $result['@metadata']['effectiveUri'];
                            break;
                        case 'CompleteMultipartUpload':
                            $result['ObjectURL'] = strtok($result['@metadata']['effectiveUri'], '?'); // $result['Location']
                            break;
                    }
    • This reply was modified 7 years, 3 months ago by ctestama.
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Problem uploading files larger than 15mb’ is closed to new replies.