☁️ Nextcloud server, a safe home for all your data
Find a file
Daniel Calviño Sánchez 038e665db9 Fix dropping a folder on a folder row
When the uploaded files have a relative path (that is, when a folder is
uploaded) it is first ensured that all the parent folders exist, which
is done by trying to create them. When a folder is created in the
currently opened folder the file list is updated and a row for the new
folder is added. However, this was done too when the folder already
existed, which caused the previous row to be removed and a new one added
to replace it.

For security reasons, some special headers need to be set in requests;
this is done automatically for jQuery by handling the "ajaxSend" event
in the document. In the case of DAV requests, if the headers are not set
the server rejects the request with "CSRF check not passed".

When a file or folder is dropped on a folder row the jQuery upload
events are chained from the initial drop event, which has the row as its
target. In order to upload the file jQuery performs a request, which
triggers the "ajaxSend" event in the row; this event then bubbles up to
the document, which is then handled by adding the special headers to the
request.

However, when a folder was dropped on a folder row that folder row was
removed when ensuring that the folder exists. The jQuery upload events
were still triggered on the row, but as it had been removed it had no
parent nodes, and thus the events did not bubble up. Due to this the
"ajaxSend" event never reached the document when triggered on the
removed row, the headers were not set, and the upload failed.

All this is simply fixed by not removing the folder row when trying to
create it if it existed already.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-01-29 13:04:19 +01:00
.github Update CONTRIBUTING.md 2019-01-25 08:46:43 +01:00
.idea Add newline that was removed by 15be763d46 2014-12-10 09:38:32 +01:00
.tx Remove old perl script to update l10n files 2018-02-08 18:21:14 +01:00
3rdparty@4e517afcd9 [3rdparty] Bump pear/archive_tar to 1.4.5 2019-01-15 09:34:42 +01:00
apps Fix dropping a folder on a folder row 2019-01-29 13:04:19 +01:00
build Bump karma-viewport from 1.0.3 to 1.0.4 in /build 2019-01-12 02:12:42 +00:00
config Honor remember_login_cookie_lifetime 2019-01-23 08:46:24 +01:00
contribute Move GitHub files to .github directory 2018-10-09 11:35:46 +02:00
core Move OC.Contactsmenu and OC.Backbone to the server bundle 2019-01-29 08:40:19 +01:00
lib Merge pull request #13798 from nextcloud/remove-legacy-activity-stuff 2019-01-28 11:17:45 +01:00
ocm-provider start implementing federated sharing 2.0 2018-07-02 11:29:27 +02:00
ocs Fix undefined constant error for STATUS_SERVICE_UNAVAILABLE 2018-07-26 22:56:17 +02:00
ocs-provider Allow to call the files even when you are in another instance atm 2016-10-06 12:15:13 +02:00
resources Update the CRL 2019-01-04 09:59:00 +01:00
settings Merge pull request #13859 from nextcloud/dependabot/npm_and_yarn/settings/vue-loader-15.6.2 2019-01-28 12:51:03 +01:00
tests Remove legacy activity stuff 2019-01-24 16:52:38 +01:00
themes Small text error 2018-07-07 01:26:07 +08:00
.babelrc Npmize (vendor) scripts 2019-01-09 15:01:59 +01:00
.codecov.yml Disable codecov status and comment 2018-06-28 16:34:16 +02:00
.drone.yml Use nextcloudci/node 2019-01-25 12:36:42 +01:00
.gitattributes Update the git attributes 2019-01-15 20:45:42 +01:00
.gitignore Npmize (vendor) scripts 2019-01-09 15:01:59 +01:00
.gitmodules targets 3rdparty submodule from Nc instead of oC 2016-06-28 18:39:51 +02:00
.htaccess Fix loading of .woff2 files in .htaccess 2018-11-18 11:02:20 +01:00
.jshintrc Reduce JSHint errors/warnings 2017-11-06 09:57:59 +01:00
.mailmap Run updated license header updater 2017-11-07 13:47:42 +01:00
.scrutinizer.yml Migrate Scrutinizer to new PHP Analysis 2018-10-17 19:46:38 +02:00
.tag Add .tag file to make tar balls tracable 2014-06-14 17:40:32 +02:00
.user.ini Make sure memory limit is > post size and upload filesize 2016-09-13 16:50:36 +02:00
AUTHORS Run updated license header updater 2017-11-07 13:47:42 +01:00
autotest-checkers.sh Mergejs is gone 2019-01-09 15:02:01 +01:00
autotest-external.sh Set exit code to 1 if integration test is failing 2016-12-20 23:40:49 +01:00
autotest-js.sh Fixed tests 2018-07-19 08:16:59 +02:00
autotest.sh Remove comment about hhvm 2018-10-09 10:10:31 +02:00
CHANGELOG.md Add link to real changelog 2017-07-19 10:39:55 +02:00
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md 2018-01-10 09:32:58 +01:00
composer.json Use classmap to load core files 2016-07-18 14:46:54 +02:00
console.php Add note for Docker users running console 2019-01-03 11:36:56 -05:00
COPYING Rename COPYING-AGPL to COPYING 2016-09-13 22:51:02 +02:00
COPYING-README Rename COPYING-AGPL to COPYING 2016-09-13 22:51:02 +02:00
cron.php Fix code style 2018-05-23 17:33:11 +02:00
index.html remove type="text/javascript" from index.html 2018-08-20 20:13:40 +09:00
index.php Log the previous exception during hard failure 2018-11-01 22:27:56 +01:00
occ Use a more universal shebang 2014-11-19 17:34:03 +01:00
package-lock.json Bump css-vars-ponyfill from 1.16.2 to 1.16.3 2019-01-26 21:34:28 +01:00
package.json Bump css-vars-ponyfill from 1.16.2 to 1.16.3 2019-01-26 21:34:28 +01:00
public.php returns a 501 instead of exception if app is not installed - #13088 2018-12-19 07:41:25 +01:00
README.md Use latest instead of fixed version number 2019-01-01 19:44:37 +01:00
remote.php Do not use HTTP code OC_Response constants anymore 2018-06-26 16:14:15 +02:00
robots.txt Add robot.txt 2013-01-28 16:39:53 -06:00
status.php Replace hardcoded status headers with calls to http_response_code() 2018-06-26 16:14:15 +02:00
version.php Bump versions of server and the requirements of apps 2018-11-23 10:28:40 +01:00

Nextcloud Server ☁

Scrutinizer Code Quality codecov CII Best Practices irc irc

A safe home for all your data.

Why is this so awesome? 🤩

  • 📁 Access your Data You can store your files, contacts, calendars and more on a server of your choosing.
  • 🔄 Sync your Data You keep your files, contacts, calendars and more synchronized amongst your devices.
  • 🙌 Share your Data …by giving others access to the stuff you want them to see or to collaborate with.
  • 🚀 Expandable with dozens of Apps ...like Calendar, Contacts, Mail and all those you can discover in our App Store
  • 🔒 Security with our encryption mechanisms, HackerOne bounty program and two-factor authentication.

You want to learn more about how you can use Nextcloud to access, share and protect your files, calendars, contacts, communication & more at home and at your Enterprise? Learn about all our Features.

Get your Nextcloud 🚚

Enterprise? Public Sector or Education user? You may want to have a look into the Enterprise Support Subscription provided by the Nextcloud GmbH.

Get in touch 💬

You can also get support for Nextcloud!

Join the team 👪

There are many ways to contribute, of which development is only one! Find out how to get involved, including as translator, designer, tester, helping others and much more! 😍

Development setup 👩‍💻

  1. 🚀 Set up your local development environment
  2. 🐛 Pick a good first issue
  3. 👩‍🔧 Create a branch and make your changes. Remember to sign off your commits using git commit -sm "Your commit message"
  4. ⬆ Create a pull request and @mention the people from the issue to review
  5. 👍 Fix things that come up during review
  6. 🎉 Wait for it to get merged!

Third-party components are handled as git submodules which have to be initialized first. So aside from the regular git checkout invoking git submodule update --init or a similar command is needed, for details see Git documentation.

Several apps that are included by default in regular releases such as First run wizard or Activity are missing in master and have to be installed manually by cloning them into the apps subfolder.

Otherwise, git checkouts can be handled the same as release archives, by using the stable* branches. Note they should never be used on production systems.

Building front-end code 🏗

We move more and more towards using Vue.js in the frontend, starting with Settings. For building the code on changes, use these terminal commands in the settings subfolder:

# install dependencies
make dev-setup

# build for development
make build-js

# build for development and watch edits
make watch-js

# build for production with minification
make build-js-production

# clean output files
make clean

When making changes, also commit the compiled files!

We still use Handlebars templates some places in Files and Settings. We will replace these step-by-step with Vue.js, but in the meantime you need to compile them separately.

If you dont have Handlebars installed yet, you can do it with this terminal command:

sudo npm install -g handlebars

Then inside the root folder of your local Nextcloud development installation, run this command in the terminal every time you changed a .handlebars file to compile it:

./build/compile-handlebars-templates.sh

Tools we use 🛠

Contribution guidelines 📜

All contributions to this repository from June, 16 2016 on are considered to be licensed under the AGPLv3 or any later version.

Nextcloud doesn't require a CLA (Contributor License Agreement). The copyright belongs to all the individual contributors. Therefore we recommend that every contributor adds following line to the header of a file, if they changed it substantially:

@copyright Copyright (c) <year>, <your name> (<your email address>)

Please read the Code of Conduct. This document offers some guidance to ensure Nextcloud participants can cooperate effectively in a positive and inspiring atmosphere, and to explain how together we can strengthen and support each other.

Please review the guidelines for contributing to this repository.

More information how to contribute: https://nextcloud.com/contribute/