file sharing via link broken

Ask all your questions regarding OC 5.x Please read the Support Forum Rules
Forum rules
ownCloud 5.x reached end of life and is officially unsupported. For details see Wiki page.

Please upgrade your ownCloud.
himbeere
Newbie
Posts: 7
Joined: Fri Sep 21, 2012 11:44 am

file sharing via link broken

Postby himbeere » Thu Mar 14, 2013 1:11 pm

Hello.

After upgrading to 5.0 i'm not able anymore to share via links. I get 404.

"GET /public.php?service=files&t=a27d27681a70bc8f355c54bbff9f93e8&download HTTP/1.1" 404 1365

Some has an idea whats causing this?

Smasher
Newbie
Posts: 4
Joined: Thu Mar 14, 2013 3:28 pm
Webserver: Apache
Database: SQLite
OS: Linux

Re: file sharing via link broken

Postby Smasher » Thu Mar 14, 2013 3:37 pm

Hi,

same problem here. Just installed a fresh copy of version 5.0.

Sharing with a link does not work because the link contained in the email produces a HTTP 404. -> Cloud not found. No difference if using password or not.

regards,
Flo

cantlep
Helpful Elf
Posts: 162
Joined: Thu Jan 24, 2013 7:01 pm
ownCloud version: 6.0.3
Webserver: Apache
Database: MySQL
OS: Linux
PHP version: 5.3.3

Re: file sharing via link broken

Postby cantlep » Thu Mar 14, 2013 3:58 pm

Last edited by cantlep on Thu Mar 14, 2013 4:15 pm, edited 1 time in total.

Smasher
Newbie
Posts: 4
Joined: Thu Mar 14, 2013 3:28 pm
Webserver: Apache
Database: SQLite
OS: Linux

Re: file sharing via link broken

Postby Smasher » Thu Mar 14, 2013 4:13 pm

as far as I can see, owncloud simply doesn't insert a record in the database table "oc_share" for the shared file, resulting in the file not being found when clicking the link in the email.

cantlep
Helpful Elf
Posts: 162
Joined: Thu Jan 24, 2013 7:01 pm
ownCloud version: 6.0.3
Webserver: Apache
Database: MySQL
OS: Linux
PHP version: 5.3.3

Re: file sharing via link broken

Postby cantlep » Thu Mar 14, 2013 4:19 pm

The updated bug tracker link I pasted into my original post contains a fix.

Although having said that, it doesn't seem to work for me for images or single files (only directories) :-(
Last edited by cantlep on Thu Mar 14, 2013 4:27 pm, edited 2 times in total.

Smasher
Newbie
Posts: 4
Joined: Thu Mar 14, 2013 3:28 pm
Webserver: Apache
Database: SQLite
OS: Linux

Re: file sharing via link broken

Postby Smasher » Thu Mar 14, 2013 4:19 pm

thx seems to be working :)

cantlep
Helpful Elf
Posts: 162
Joined: Thu Jan 24, 2013 7:01 pm
ownCloud version: 6.0.3
Webserver: Apache
Database: MySQL
OS: Linux
PHP version: 5.3.3

Re: file sharing via link broken

Postby cantlep » Thu Mar 14, 2013 4:28 pm

Does it work for you with a single file. i.e When you get the link to a file (not a dir) can you download it? Also, with an image, can you see it in the original page or download it? I can't.... If you can't either, I'll ask the devs to reopen the bug

Smasher
Newbie
Posts: 4
Joined: Thu Mar 14, 2013 3:28 pm
Webserver: Apache
Database: SQLite
OS: Linux

Re: file sharing via link broken

Postby Smasher » Thu Mar 14, 2013 4:34 pm

yes, after changig the file lib/files.php according to the post on github it works, even with the preview of the image that I shared.

line 53-55:

change

Code: Select all

if (count($files) == 1) {
         $files = $files[0];
}


to

Code: Select all

if (is_array($files) && count($files) == 1) {
$files = $files[0];
}

cantlep
Helpful Elf
Posts: 162
Joined: Thu Jan 24, 2013 7:01 pm
ownCloud version: 6.0.3
Webserver: Apache
Database: MySQL
OS: Linux
PHP version: 5.3.3

Re: file sharing via link broken

Postby cantlep » Thu Mar 14, 2013 4:38 pm

I missed a damn bracket from the is_array...I wish it would have just FATAL'd :lol:

Sorted now!

chillimax
Beginner
Posts: 19
Joined: Thu Mar 14, 2013 6:26 pm
Webserver: Apache
Database: MySQL
OS: Linux
PHP version: 5.3.10

Re: file sharing via link broken

Postby chillimax » Thu Mar 14, 2013 6:47 pm

I tired editing the files.php and changing those lines but now instead of a 'cloud not found' I get an error 500 when clicking on the links.


  • Similar Topics
    Replies
    Views
    Last post

Return to “ownCloud Community Edition 5.x and older”

Who is online

Users browsing this forum: No registered users and 3 guests