-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Local storage being used for uploads from sdcard #5910
Comments
True, the file to be uploaded is first copied in internal storage and then uploaded. @ezaquarii @AndyScherzinger I think we can change this, or? |
Would it be possible to lock a file during the process of uploading this file so that it cannot be deleted by the user during this time? |
On Wed, Apr 22, 2020 at 04:22:48AM -0700, Tobias Kaminsky wrote:
True, the file to be uploaded is first copied in internal storage and then uploaded.
I am unsure for the reason, but I think it might be so that the file cannot be removed (e.g. external storage removed) while uploading.
@ezaquarii @AndyScherzinger I think we can change this, or?
It's a defensive behaviour. Nothing wrong with it per se, but it
comes at an obvious cost and I'm wondering if it's so common
that people delete files during upload so that we must protect
them.
I think we could optimize it by uploading directly from
source file if there is not enough space to inernalize it,
or the file is above size threshold making copying slow.
|
On Wed, Apr 22, 2020 at 04:42:47AM -0700, ggeorgg wrote:
Would it be possible to lock a file during the process of uploading this file so that it cannot be deleted by the user during this time?
Deletion during upload is not a problem, as Linux will
not remove the file until it's closed by last reader.
Restarting such upload will however fail with ENOENT, or IOException.
I don't believe android offers file locking API.
|
Does it make sense to just delete the file from the upload queue if it does not exist anymore? |
We have some logic in it, as it sometimes say "local file not found"… |
This comment was marked as outdated.
This comment was marked as outdated.
Can we keep this issue open? If it is closed by the bot, it will be forgotten. |
This comment was marked as resolved.
This comment was marked as resolved.
Was experiencing this issue with an SD Card formatted as Internal Storage. Explicitly moving the App to the Internal Storage (and resetting it) made it work for me. |
The problem still persists. Can we reopen this issue? |
This appears to be a regression of #26. |
same issue here (redmi note 9, miui 12). |
Steps to reproduce
Preconditions:
Set up auto-upload for the directory containing the 800MB video file using "Upload already existing data". (I did this unintentionally. Actually I have already uploaded all the file before...)
Expected behaviour
Uploads gets done.
Actual behaviour
Uploads fails with message: "File XYZ could not be copied to nextcloud local folder"
Server configuration detail
Operating system: Linux 4.12.14-lp151.28.44-default #1 SMP Fri Mar 20 18:20:20 UTC 2020 (dbf1aea) x86_64
Webserver: nginx/1.14.2 (fpm-fcgi)
Database: mysql 10.2.31
PHP version:
7.2.5
Modules loaded: Core, date, libxml, pcre, filter, hash, Reflection, SPL, session, SimpleXML, standard, xml, mysqlnd, cgi-fcgi, apcu, bz2, ctype, curl, dom, mbstring, fileinfo, gd, gettext, iconv, imagick, intl, json, exif, mysqli, openssl, pcntl, PDO, pdo_mysql, pdo_sqlite, posix, redis, sqlite3, tokenizer, xmlreader, xmlwriter, zip, zlib, Zend OPcache
Nextcloud version: 18.0.3 - 18.0.3.0
Updated from an older Nextcloud/ownCloud or fresh install: No
Where did you install Nextcloud from: source
Signing status
Array
(
)
List of activated apps
Configuration (config/config.php)
Are you using external storage, if yes which one: No
Are you using encryption:
Are you using an external user-backend, if yes which one: Webdav
Client configuration
Browser:
Operating system:
Logs
Web server error log
Nextcloud log
Browser log
Nothing related to this issue.
The text was updated successfully, but these errors were encountered: