veliovgroup / Meteor-Files

🚀 Upload files via DDP or HTTP to ☄️ Meteor server FS, AWS, GridFS, DropBox or Google Drive. Fast, secure and robust.
https://packosphere.com/ostrio/files
BSD 3-Clause "New" or "Revised" License
1.11k stars 166 forks source link

Upgrading from 1.14.2 to 1.14.3 (or higher) breaks downloads #796

Closed naschpitz closed 1 year ago

naschpitz commented 3 years ago

I am having an issue after I upgraded to Meteor 2.1.1 and the ostrio:files version was automatically upgraded from 1.14.2 to 1.14.3.

When I click on the client to download a given file through a link generated by the link() function, a file is downloaded but it's size is 0 bytes.

Downgrading to 1.14.2 solves the issue and the file is correctly downloaded.

dr-dimitru commented 3 years ago

Hello @naschpitz,

Thank you for reporting this issue. To investigate this I need additional details:

  1. Server platform and version (Mac/Win/Linux)?
  2. Where files are stored? On FS? AWS?
  3. What browser(s)/platform issue persists?
  4. Have you tried to download a file with cURL and/or wget? Post its verbose logs here
naschpitz commented 3 years ago

Hello there, @dr-dimitru, thank you so much for the quick reply =D

  1. Server Platforms 1.1. Linux Mint 20.1 Ulyssa (locally) 1.2. Ubuntu 20.04.1 LTS (Scaleway)

  2. Storage 2.1. FS (locally) 2.2. S3-like, using S3FS (Scaleway)

  3. Browser: Google Chrome 88.0.4324.150

  4. cURL logs

    4.1. 1.14.2

    naschpitz@g7-7588:~$ curl -o test.mp4 http://localhost:3000/videos/videos/Hkwak3BPK9e5ey97b/original/Hkwak3BPK9e5ey97b.mp4?xmtok=ekNg43kk2ACT8ccJJ -v
    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
    0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   Trying 127.0.0.1:3000...
    * TCP_NODELAY set
    * Connected to localhost (127.0.0.1) port 3000 (#0)
    > GET /videos/videos/Hkwak3BPK9e5ey97b/original/Hkwak3BPK9e5ey97b.mp4?xmtok=ekNg43kk2ACT8ccJJ HTTP/1.1
    > Host: localhost:3000
    > User-Agent: curl/7.68.0
    > Accept: */*
    > 
    * Mark bundle as not supporting multiuse
    < HTTP/1.1 200 OK
    < content-disposition: inline; filename="Airfoil%20NACA%202412%2015%20deg.mp4"; filename*=UTF-8''Airfoil%20NACA%202412%2015%20deg.mp4; charset=UTF-8
    < cache-control: public, max-age=31536000, s-maxage=31536000
    < connection: keep-alive
    < content-type: video/mp4
    < accept-ranges: bytes
    < date: Mon, 12 Apr 2021 12:53:13 GMT
    < transfer-encoding: chunked
    < 
    { [65174 bytes data]
    100 13.4M    0 13.4M    0     0   194M      0 --:--:-- --:--:-- --:--:--  194M
    * Connection #0 to host localhost left intact

    4.2. 1.14.3

naschpitz@g7-7588:~$ curl -o test.mp4 http://localhost:3000/videos/videos/Hkwak3BPK9e5ey97b/original/Hkwak3BPK9e5ey97b.mp4?xmtok=ekNg43kk2ACT8ccJJ -v
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   Trying 127.0.0.1:3000...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 3000 (#0)
> GET /videos/videos/Hkwak3BPK9e5ey97b/original/Hkwak3BPK9e5ey97b.mp4?xmtok=ekNg43kk2ACT8ccJJ HTTP/1.1
> Host: localhost:3000
> User-Agent: curl/7.68.0
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< content-disposition: inline; filename="Airfoil%20NACA%202412%2015%20deg.mp4"; filename*=UTF-8''Airfoil%20NACA%202412%2015%20deg.mp4; charset=UTF-8
< cache-control: public, max-age=31536000, s-maxage=31536000
< connection: keep-alive
< content-type: video/mp4
< accept-ranges: bytes
< content-length: 0
< date: Mon, 12 Apr 2021 12:50:22 GMT
< 
* Excess found: excess = 17 url = /videos/videos/Hkwak3BPK9e5ey97b/original/Hkwak3BPK9e5ey97b.mp4 (zero-length body)
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
* Connection #0 to host localhost left intact
imongithubnow commented 3 years ago

Hi, I confirm this issue.

  1. Server platform and version (Mac/Win/Linux): Linux Debian Buster
  2. Where files are stored? On FS? AWS?: local filesystem
  3. What browser(s)/platform issue persists? Chromium 90.0.4430.212, Firefox 78.10.0esr
  4. Have you tried to download a file with cURL and/or wget? Post its verbose logs here

ostrio:files 1.14.2

> GET /cdn/storage/files/iLrXexjbSyb33FjQ6/small/iLrXexjbSyb33FjQ6 HTTP/1.1
> Host: localhost:3000
> User-Agent: curl/7.74.0
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< content-disposition: inline; filename="earth-1567073728112-1858.jpg"; filename*=UTF-8''earth-1567073728112-1858.jpg; charset=UTF-8
< cache-control: public, max-age=31536000, s-maxage=31536000
< connection: keep-alive
< content-type: application/octet-stream
< accept-ranges: bytes
< date: Sun, 30 May 2021 06:18:27 GMT
< transfer-encoding: chunked
< 
{ [1496 bytes data]
100  1489    0  1489    0     0   242k      0 --:--:-- --:--:-- --:--:--  242k
* Connection #0 to host localhost left intact

ostrio:files 1.14.3

> GET /cdn/storage/files/iLrXexjbSyb33FjQ6/small/iLrXexjbSyb33FjQ6 HTTP/1.1
> Host: localhost:3000
> User-Agent: curl/7.74.0
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 503 Service Unavailable
< Content-Type: text/plain
< Date: Sun, 30 May 2021 06:23:16 GMT
< Connection: keep-alive
< Keep-Alive: timeout=5
< Transfer-Encoding: chunked
< 
{ [28 bytes data]
100    17    0    17    0     0   1307      0 --:--:-- --:--:-- --:--:--  1307
* Connection #0 to host localhost left intact
dr-dimitru commented 3 years ago

@imongithubnow thank you for sharing it. @imongithubnow @naschpitz Any chance you can upgrade to lates release v2.0.1 to test it out? This issue should be solved on the latest release. Let me know guys

imongithubnow commented 3 years ago

I tried right now, I confirm the issue is gone ! Now I have to refactor my codebase because 2.0.1 version is to much different from 1.4.2 but now the file is download well.

dr-dimitru commented 3 years ago

@naschpitz let me know if you've tried upgrading to the latest release

naschpitz commented 3 years ago

@dr-dimitru, sorry for the delay, I'll test that ASAP, thanks!

dr-dimitru commented 2 years ago

Feel free to close it in case if the issue is solved on your end.

dr-dimitru commented 1 year ago

Closed due to silence at issue owner end. Feel free to reopen it in case if the issue still persists on your end.