ocshare

Rating: 
5
Your rating: None Average: 5 (1 vote)

Application for easily uploading files to ownCloud and sharing them.

Ocshare can be used to upload to ownCloud and create shares by itself, but it will be more useful when used with libocshare and/or ownCloud photo backup daemon.

Features:

  • When started, can automatically upload, share, start messages or email app and quit.
  • Supports multiple owncloud accounts.
  • Can be used with ownclouds with self signed certificates.

Versions up to 0.6.3 tested with ownCloud 9.1.4. Version 0.6.4 works with Nextcloud 12 too.

Source available with bazaar:

bzr branch https://k2c42.dy.fi/bzr/ocshare/

File to upload can be given on command line:

ocshare /path/to/file

 

Instructions

Quickstart

  • Choose a directory in owncloud where you want to upload the shared files.
  • Start ocshare and add ownCloud account. Save settings from the pull down menu.
  • If you use the ownCloud photo backup daemon, you might want to use same path where photos are automatically uploaded. That way the photos are not uploaded again when you want to share them.

Settings

Settings page lists ownCloud accounts.

  • Use pull down menu to add a new account
  • Use push up menu to view or delete accepted self signed certificates
  • Use context menu (long press) of an account to edit, delete or test connection to.

Settings explained

  • account name: Text that will appear on the list of ownCloud accounts. You can write whaterver you want here
  • owncloud base URL: Url to front page of ownCloud, typically https://some.address/owncloud
  • ownCloud username, ownCloud password: Username and password you use when loggin in to ownCloud
  • path in owncloud: Path in ownCloud where you want to upload the files. For example if you type "photos" here, then you need to create a folder called "photos" in ownCloud.
  • Upload and share automatically: When a file and an ownCloud account is selected, upload file and create a share for it automatically without asking confirmations.
  • Quit automatically: Quit ocshare automatically when file is uploaded and shared and share link is copied to clipboard.
  • Send link via email: Start the email app after uploading and creating share.
  • Start messages app: Start the messages app after uploading and creating share.
  • Always ignore all ssl errors: Ignore ssl erros with this account.

Self signed certificates

If your ownCloud uses a self signed certificate, consider using letsencrypt. But if you can't do that, you can add an exception to trust the certificate. Choose "Test Connection"  either from context menu in the account list or push up menu when editing the account.

If you choose the "Always ignore all ssl errors" option, then any certificate will be accepted, even if it is different in a mitm attack.

Uploading and sharing files

  1. Account selection: If you have more than one account and zero or more than one of them is marked "Upload and share automatically" then ocshare will first ask which account you want to use.
  2. File selection: If file was not given on command line, a file picker is started at /home/nemo. You can go to /media/sdcard from the pull down menu
  3. Uploading: File is uploaded to ownCloud to the path set in the account settings. If a file with a same name already exists, the upload is skipped.
  4. Sharing: A public share to the file is created in ownCloud and link is copied to clipboard
  5. Convenience actions: Depending on the settings of the account, email app or messages app is started and/or ocshare is quit automatically.

 

 

Application versions: 
AttachmentSizeDate
File ocshare-0.6.3-1.i486.rpm91.33 KB27/06/2017 - 19:46
File ocshare-0.6.3-1.armv7hl.rpm87.22 KB27/06/2017 - 19:46
File ocshare-0.6.4-1.armv7hl.rpm89.7 KB30/12/2017 - 18:02
File ocshare-0.6.4-1.i486.rpm93.83 KB30/12/2017 - 18:02
Changelog: 

0.6.1

  • First release

0.6.2

  • Fix uploading when file name is not given on command line
  • I18N fixes

0.6.3

  • UI improvements in settings page
  • Add Pull down menu option to move to memory card when file is not given on command line

0.6.4

  • Show error message if creating share fails
  • Add share api version selection to settings
  • Add OCS-APIRequest header to pass CSRF check

Comments

bomo's picture

I know this app is called "ocshare" but is there the possibility of adding a sync option where folders from the server are downloaded to the phone (and kept up to date regarding changes on the server)?

mijutu's picture

I wish I had more time for this project.

The client at https://github.com/nextcloud/client/ seems to be made with Qt. Perhaps someone could port that to Sailfish by replacing widgets with QML.

Ingvix's picture

ownCloud-tili tulisi kyllä väliviivalla, kun sovelluksessa se on ilman. Mikäköhän tuo tunniste on ja mistä sen ownCloud-serveriltäni löydän, kun ei ole ennen ollut tuollaiselle tarvetta.

Tapana myös on asettaa focus seuraavaan tekstikenttään, kun painaa entteriä edellisessä. Dialog-komponentilla olisi mielestäni myös saanut hieman paremman käyttökokemuksen tilin lisäämisestä. Myös esimerkiksi ownCloud-osoite-tekstikentässä voisi käyttää inputMethodHints: Qt.ImhUrlCharactersOnly, jolloin näppäimistö olisi sopeutuneempi osoitteen kirjoittamiseen. Muitakin pieniä parannuksia varmasti löytyisi, mutta tässä nyt tällä erää.

Hieno homma kuitenkin, jos saatiin vihdoin ownCloudillekin toimiva sovellus, kun tuo alkuperäinen ei ole toviin toiminutkaan.

EDIT: Nyt tulikin tajuttua, että tunniste onkin siis vain tilin nimi listassa. Sovellus on kuitenkin melko sekava, vaikka sain Gallerian kautta kuvia ownCloudiin lisättyä. Itse sovelluksen kautta kun koitin valita tiedostoa, se antoi kansion jakolinkin, muttei lisännyt tiedostoa minnekään.

Voisin erityisesti ulkoasun ja käytettävyyden kanssa avustaa, jos lisäisit lähdekoodit githubiin, jolloin olisi kätevämpi tarjota parannuksia.

mijutu's picture

Kiitos kommenteista. Tein pikaisesti pari korjausta. Ehkä joku päivä ehdin lisäämään tuon githubiin.

Ingvix's picture

Nyt onnistuu sovelluksestakin tiedoston lisääminen, hyvä homma. Viimeisessä tekstikentässä enterin on myös tapana viedä focus vanhempaan, jolloin tekstikenttäkään ei jää aktiiviseksi, kun näppäimistö katoaa.