rcx icon indicating copy to clipboard operation
rcx copied to clipboard

No way to upload a file from local storage to a remote, selecting local files displays a "Download" option

Open ioogithub opened this issue 2 years ago • 1 comments

What version of RCX are you using (About -> App version)?

1.12.1

What is your Android version, phone model and manufacturer?

Android 11

Which steps are required to reproduce this issue?

  1. Select a file from local storage
  2. Long press on the file, the options are: Download, Move, Rename, Delete
  3. Tap the 3 dots menu, the options are : Properties, Open as, Move, Rename, Delete, Serve...

Repeat same actions with SAF Client Preview, same results.

There is no way to upload a file from local storage to a remote. In this context the "Download" option makes no sense as the file is already local.

Even from a fresh install it appears like the app will never work as "Internal shared storage" is an item listed under "Remotes" which makes no sense as local storage is not a remote, it is by definition, local. If a file is long pressed from a fresh install, the "Download" button is displayed.

Does the same issue also occur when using the same configuration on a PC or in Termux?

Termux and other rclone implementations work as expected, this issue seems to be RCX is displaying a Download link for local files.

There are no errors it just doesn't work.

ioogithub avatar Jul 17 '21 18:07 ioogithub

Since this is a area that really should be documented, I'm going to write a bit of a longer post to make it easier to re-work this later into the docs.

The problem stems from the fact that it seemed that Android was going to completely remove local storage access in Android 10, only to back paddle with Android 11 and allow this again, provided the developers sign over their firstborn.

For your specific situation, there are two things you can try:

  1. Navigate to the target directory and upload your file in the (+) menu. If your source file is only accessible via SAF, try idea 2.

  2. Alternatively, you can try the provider preview. First, go to Settings in RCX and enable the Content Provider Preview. There are at least two alternative approaches with SAF:

    • Open DocumentsUI, the native Android File Manager. This app may be hard to find and is usually called "Downloads" or "Files". If you can't find it, you can add a shortcut manually with a good launcher like Nova, or use this dedicated app. Open DocumentsUI and RCX should appear in the left-hand drawer.

    • Alternatively, use Material Files and add RCX as external storage. You can also use any other SAF compatible File Manager you like.

    Regardless of which app you chose, you can then use the controls of that app to copy and move files between local and remote storage locations. If both source and target are located within RCX, the copy/move command will be translated into an rclone copy or move command under the hood; if not, into a cat or rcat.


For the docs: How RCX sees storage locations and drives on your device.

(1) Some menu actions like 'Download' or 'Link' are not shown when RCX knows for sure that they would not work, e.g. for remotes of types local, crypt, saf and any other local paths. They are deliberately hidden in those situations (commit).

(2) Google has made drastic changes to the Android storage model since RCX was first implemented, and as a result, the storage handling of RCX is all over the place. Currently (v1.12.2) we have:

  • Remotes with type local Always point to the primary storage, which is usually internal flash.
  • Remotes created by "refresh local drives" This option of RCX checks the currently available storage locations on start (Can we access external drives?) and then creates an alias remote for each accessible drive/root.
  • The local-saf remote, created when SAF Client preview is enabled. Each added storage is shown as subfolder. These remotes are not very well integrated and cannot be stacked.

(3) In addition to these remote types, we also have the File Picker that is shown when someone selects (+) > Upload Files in a folder. The file picker only shows storage locations to which RCX has access permissions. Check the app details for RCX and enable storage access if the File Picker does not show you your files.


What we want to do.

  • Add SAF support to the File Picker. Result: you can then upload from any third party app (that supports this in general) or local storage.
  • Add remote to remote copy/move/sync support. Then RCX can also copy to and from any of the synthetic remotes (crypt, saf, locally refreshed remotes, etc.). https://github.com/x0b/rcx/issues/49
  • Unify the remote list. I don't like the current mix of regular remotes, auto-refreshed remotes and the SAF remote. I would like to have a complete list of all storage locations. I also don't like that the list is pretty inflexible; if you plug in a USB OTG drive, for example, you have to restart RCX or it won't show up otherwise.

x0b avatar Jul 18 '21 10:07 x0b