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

Can't download file with Android #114

Closed
irmlerc opened this issue Sep 26, 2014 · 17 comments
Closed

Can't download file with Android #114

irmlerc opened this issue Sep 26, 2014 · 17 comments

Comments

@irmlerc
Copy link

irmlerc commented Sep 26, 2014

Hello,

I installed seafile on Debian using MySQL. I didn't change any setup parameters, everything was installed by default and I also use the default ports and no additional webserver. Just Apache2 is also installed on the machine with port 80, but not used. And I am not behind a firewall, the server is inside the same LAN.

With the Android client I can surf through the folders and see the file lists of them, but when I try to download or upload anything, it loads and loads and loads and seems to run into a timeout, because I get the message, that the download failed.

I saw, that webdav was not enabled, so I changed my webdav config:

[WEBDAV]
enabled = true
port = 8080
fastcgi = false
share_name = /

I can reach webdav now with http://192.168.30.207:8080

The windows client also works. The only what not works is downloading/uploading with Android :(

@freeplant
Copy link
Member

This is a common error. Please check setting of FILE_SERVER_ROOT

@irmlerc
Copy link
Author

irmlerc commented Sep 26, 2014

Thank you, now it doesn't run into a timeout, but i get the "download
failed" error immediately after clicking at a file.

What is the default file_server_root what should be used? The windows
client connets to "http://192.168.30.207:8000". But this doesn't work with
Android. I tried the webdav port instead, but it also doesn't work: "
http://192.168.30.207:8080". Also calling without port doesn't bring me
success: "http://192.168.30.207"

What runs wrong?

2014-09-26 13:42 GMT+02:00 Daniel Pan notifications@github.com:

This is a common error. Please check setting of FILE_SERVER_ROOT


Reply to this email directly or view it on GitHub
#114 (comment).

@freeplant
Copy link
Member

Sorry for the mistake. If you do not use Apache/Nginx, you don't need to set FILE_SERVER_ROOT. Can you download files via the web interface?

@irmlerc
Copy link
Author

irmlerc commented Sep 26, 2014

No, I can't download and upload with Android. Seafile works for me just
with Windows-client at the moment. With Android I'm just able to load the
file-lists of the folders. But downloading and uploading brings me a
"download failed" error.

2014-09-26 14:02 GMT+02:00 Daniel Pan notifications@github.com:

Sorry for the mistake. If you do not use Apache/Nginx, you don't need to
set FILE_SERVER_ROOT. Can you download files via the web interface?


Reply to this email directly or view it on GitHub
#114 (comment).

@irmlerc
Copy link
Author

irmlerc commented Sep 26, 2014

Oh, you meant the webinterface of seafile, you didn't mean
Android-webinterface, right?
Yes, i can download with it on http://192.168.30.207:8000 (log in with my
user name, select a file and load down)

2014-09-26 14:04 GMT+02:00 Christian Irmler irmlerc@gmail.com:

No, I can't download and upload with Android. Seafile works for me just
with Windows-client at the moment. With Android I'm just able to load the
file-lists of the folders. But downloading and uploading brings me a
"download failed" error.

2014-09-26 14:02 GMT+02:00 Daniel Pan notifications@github.com:

Sorry for the mistake. If you do not use Apache/Nginx, you don't need to
set FILE_SERVER_ROOT. Can you download files via the web interface?


Reply to this email directly or view it on GitHub
#114 (comment).

@freeplant
Copy link
Member

If you can download files from the web interface (via a browser in desktop), the config should be OK. Android client uses the same ports and methods to download a file.

You may also try download a file via a browser in Android for debugging.

@irmlerc
Copy link
Author

irmlerc commented Sep 26, 2014

First of all: I thank you very much for your help!

Strange. Now it works... :)
I just removed the FILE_SERVER_ROOT entry from the config and restarted.
But I swear, it didn't work before.

But now I see another problem:
Auto-Upload tries to upload all my around 5.000 pictures. I just want to
upload the new pictures up from now. Is there any possibility to reach this?

@freeplant
Copy link
Member

Not possible to only upload new pictures yet.

@irmlerc
Copy link
Author

irmlerc commented Oct 4, 2014

Hello,
me again :)

It works now inside the LAN, but when I access from extern over WAN, I can't download neighter with browser (not with PC, not with Android) nor with android-app. I see all files and folders, but can't download/upload anything.

But I have all ports open (8000, 8082, 10001,12001, 8080) and have implemented NAT rules to the local IP inside the LAN.

I can synchronize with my PC from extern, but I can't download/upload with Android-app from extern, and also not download/upload over any browser.

Perhaps there is to allow the additional used URL anywhere?
Inside the LAN i access over http://192.168.30.207:8000
From extern i access with an URL like http://:8000

Thank you!

@PocketSam
Copy link

I've got the same problem!
I can sync my PC from extern, but I can't download/upload with Android-app. Only if smartphone is connected to local network with the seafile server.

Can't find a clue what it may be.

@Logan676 Logan676 reopened this Mar 18, 2015
@shoeper
Copy link
Collaborator

shoeper commented Mar 19, 2015

Are you sure you can connect to all ports from external? I'd strongly recommend to setup nginx or apache with ssl if you want to access Seafile over public internet. It is more secure and avoids problems with blocked ports because port 443 (ssl) is almost never blocked. Also don't forget to set hsts headers and disable non tls connections (sslv2/v3).

@PocketSam
Copy link

Wouldn't it slow down Seafile?

@shoeper
Copy link
Collaborator

shoeper commented Mar 20, 2015

I don't think you'll notice a speed difference.

@PocketSam
Copy link

OK, I'll try that and reopen ticket in case of problems.

@PocketSam
Copy link

I've found a problem. Android can't download/upload if server redirects mobile client woth 301 code. I've changed FILE_SERVER_ROOT in seahub_settings.py to the httpS://site.tld:443/ and it started to function with no problems!

@sam9s
Copy link

sam9s commented Jul 2, 2017

Poket Sam .. I am also facing the same issue . Cannot download upload from WAN, port 8010 (changed it to 8010 from 8000 )and 8082 are fw. I CAN acccess the server browse and view all files from Android app androind browser BUT cannot download or upload unless I am on local lan. I also DO NOT have any entry or line in the seahub_settings.py that says FILE_SERVER_ROOT. All I have is SECRET_KEY = "wx9$%!g-%&msomethinglike this%ubkm+^64kg&_@#qlhqss2"

Can you assist ....

@jrtech3d
Copy link

jrtech3d commented Oct 1, 2017

I know some of these post are more than 3 years old but i actually found the solution to the download/upload issue.

First and foremost, the changes that are going to be made to SERVICE_URL and FILE_SERVER_ROOT options, please do it through the web interface as this has higher precedents over php and db files.
.
.
.

SOLUTION FOR INTERNAL or LOCAL UPLOAD/DOWNLOAD

Step 1
When you access the FILE_SERVER_ROOT option from the web browser, the default address should
be http://127.0.0.1:8082. If you want to upload/download files locally, set the FILE_SERVER_ROOT address to your server's local physical IP address followed by the default port number .
Example http://192.168.1.45:8082

Step 2
Do the same for the SERVICE_URL option. Same IP but different port number. The SERVICE_URL port is 8000 and NOT 8082.
Example http://192.168.1.45:8000

So you should have something like this
SERVICE_URL http://192.168.1.45:8000
FILE_SERVER_ROOT http://192.168.1.45:8082

Step 3
Restart seafile server by right clicking on seafile icon at lower right of the desktop and select "Restart Seafile Server".

Step 4
Open the SeaFile app on your phone (whether android or iOS)

Step 5
Select the "Add Account" option and the server option you will be selecting is " Other Seafile Server"

Step 6
a. uncheck the https option
b. For the server address, enter : http://192.168.1.45:8000 (remember it will be your server's IP address and not specifically 192.168.1.45 as this address i used is an example)
c. The username or email will be the credentials you created through the admin account
d. The password will be the password for the username or email you created

Once this is completed you should have local access to your cloud server and with the ability to upload/download
N.B : If you encounter connection problems, temporarily disable windows firewall. If that resolves the issue, re-enable the firewall, configure and allow ports 8000 and 8082 and the server's IP address through the firewall.
.
.
.
.

SOLUTION FOR BOTH INTERNAL AND EXTERNAL UPLOAD/DOWNLOAD

External upload/download means you will be accessing your cloud server remotely and this means you will have some more configurations to do

Step 1
Obtain your public IP address. This is most often available through the WAN status of your home gateway router. (This is your router connecting to your ISP)

Step 2
You will have to forward ports 8000 and 8082 on your gateway router (This is your router connecting to your ISP). Because of the vast variations and variety of routers, I cannot walk you through Port Forwarding / Virtual Servers features
N.B : If you have additional internal routers, you will also have to forward ports 8000 and 8082

Step 3
Go to the FILE_SERVER_ROOT option and set the address to your public IP, followed by port 8082
Example FILE_SERVER_ROOT http://x.x.x.x:8082 ( the Xs represents your public IP)

Step 4
Go to the SERVICE_URL option and set the address to your public IP, followed by port 8000
Example SERVER_URL http://x.x.x.x:8000 ( the Xs represents your public IP)

N.B Pay close attention to the port numbers and don't mix them up

So you should have something like this ( the Xs represents your public IP)
SERVICE_URL http://x.x.x.x:8000
FILE_SERVER_ROOT http://x.x.x.x:8082

Step 5
Restart seafile server by right clicking on seafile icon at lower right of the desktop and select "Restart Seafile Server".

Step 6
Open the SeaFile app on your phone (whether android or iOS)

Step 7
Select the "Add Account" option and the server option you will be selecting is " Other Seafile Server"

Step 8
a. uncheck the https option
b. For the server address, enter : http://x.x.x.x:8000 (remember it will be your router's public IP address and it would work even if you connected locally)
c. The username or email will be the credentials you created through the admin account
d. The password will be the password for the username or email you created

AGAIN, once this is completed you should have access to your cloud server locally and externally, with the ability to upload/download files

N.B : If you encounter connection problems, temporarily disable windows firewall. If that resolves the issue, re-enable the firewall, configure and allow ports 8000 and 8082 and the server's IP address through the firewall. Also remember to forward port's 8000 and 8082 on your home gateway router

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

7 participants