GithubHelp home page GithubHelp logo

cozy / cozy-files Goto Github PK

View Code? Open in Web Editor NEW
41.0 20.0 24.0 29.13 MB

This repository was part of CozyV2 which has been deprecated

Home Page: https://blog.cozycloud.cc/post/2016/11/21/On-the-road-to-Cozy-version-3

License: GNU Affero General Public License v3.0

CSS 1.92% JavaScript 77.82% Java 12.43% HTML 0.77% CoffeeScript 7.04% Shell 0.01%

cozy-files's Introduction

โš ๏ธ This repository is no longer maintained. It's the Files application for Cozy V2. We are actively developping a new Files application for Cozy V3. You can follow the development here, to test it and report bugs. We will only fix major security or safety issues on this repository.

Cozy Files

Cozy Files makes your file management easy. Main features are:

  • File tree
  • Files and folders upload.
  • Files and folders sharing (via URLs)
  • Files and folders search
  • Files and folders tagging (and search by tag)

Install

We assume here that the Cozy platform is correctly installed on your server.

You can simply install the Files application via the app registry. Click on the Chose Your Apps button located on the right of your Cozy Home.

From the command line you can type this command:

cozy-monitor install files

Contribution

You can contribute to the Cozy Files in many ways:

  • Pick up an issue and solve it.
  • Translate it in a new language.
  • Allow to move a file from a folder to another.

Hack

Hacking the Files app requires you setup a dev environment. Once it's done you can hack Cozy Files just like it was your own app.

git clone https://github.com/cozy/cozy-files.git
cd cozy-files
npm install

Run it with:

node build/server.js

Each modification of the server requires a new build, here is how to run a build:

cake build

Each modification of the client requires a specific build too.

cd client
npm install
npm install -g brunch
brunch build

Tests

Cozy Files manages files in your Cozy platform.

Build Status

To run tests, use the following command into the Cozy Files folder:

npm test

That's how Travis run the tests and it's what should be working when pushing code.

To run the tests against the build/ version of the code, you can use:

npm run test:build

That will also run the tests on both the server and the client but you don't have to build your code each time since it will run them against server/ and client/ rather than build/.

If you only want to run the tests for the server, use

npm run test:server

If you only want to run the tests for the client, use

npm run test:client

Or cake tests:client

In order to run the tests, you must have the Data System started. Also, for client tests, you need to install CasperJS

There are two options that can be used:

  • --use-js will run the tests based on the build/ folder
  • --use-server will start a server during client tests

Icons

by iconmonstr and momentum

Main icon by Elegant Themes.

Contribute with Transifex

Transifex can be used the same way as git. It can push or pull translations. The config file in the .tx repository configure the way Transifex is working : it will get the json files from the client/app/locales repository. If you want to learn more about how to use this tool, I'll invite you to check this tutorial.

License

Cozy Files is developed by Cozy Cloud and distributed under the AGPL v3 license.

What is Cozy?

Cozy Logo

Cozy is a platform that brings all your web services in the same private space. With it, your web apps and your devices can share data easily, providing you with a new experience. You can install Cozy on your own hardware where no one profiles you.

Community

You can reach the Cozy Community by:

  • Chatting with us on IRC #cozycloud on irc.freenode.net
  • Posting on our Forum
  • Posting issues on the Github repos
  • Mentioning us on Twitter

cozy-files's People

Contributors

aenario avatar alpha14 avatar benibur avatar clochix avatar eunomie avatar felix-lambert avatar frankrousseau avatar gooz avatar jsilvestre avatar kelukelu avatar kloadut avatar lespacedunmatin avatar m4dz avatar mihneadb avatar nono avatar piatra avatar poupotte avatar seeker89 avatar waffle-iron avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cozy-files's Issues

Refactoring client

Hello,

I'd like to start the client refactoring today so please let me know if you want to change something this code. Also, if you have any question/suggestion/things you absolutely want me to do here, just leave a note here.

@frankrousseau We haven't talked about it but I'm going to use the same stack that we currently use because I think that going with React for such an important app is too risky right now. If by any chance you'd like to try it with Files, tell me :)

Support file version history

It would be great to use the underlying CouchDB doc versioning features to save file history such that when a file gets overwritten/deleted, there is a way to get back to it.

File upload and delete UX improvements

The upload and delete experiences are very "clicky." Both could be improved by removing the success dialog at the end of each operation. Since the user is returned to the directory after dismissing those boxes anyway, a successful operation of an upload or delete should already be apparent, given that the file will or will not be there. :)

If there is an error obviously that still deserves a dialog.

"Random" fails when uploading multiple files

Steps to reproduce (on Chrome/Chromium):

  • Install latest cozy-files app (as of June, 17)
  • Upload a folder with multiple file in it (a photo folder for example)

capture du 2014-06-17 13 40 37

And a slice of log:

POST /files/ 200 3654ms - 275b
GET /files/5417fd3575de1f54ee84fc7ae906e271 200 467ms - 403b
GET /files/5417fd3575de1f54ee84fc7ae906bab2 304 469ms
GET /files/5417fd3575de1f54ee84fc7ae906c1ed 304 251ms
POST /files/ 200 3834ms - 269b
GET /folders/5417fd3575de1f54ee84fc7ae90578e0 304 360ms
GET /files/5417fd3575de1f54ee84fc7ae906e271 304 272ms
GET /files/5417fd3575de1f54ee84fc7ae906faeb 200 398ms - 401b
GET /files/5417fd3575de1f54ee84fc7ae906faeb 304 250ms
POST /files/ 500 1019ms - 38b
POST /files/ 200 3652ms - 266b
GET /folders/5417fd3575de1f54ee84fc7ae90578e0 200 314ms - 217b
GET /files/5417fd3575de1f54ee84fc7ae9070df5 200 383ms - 277b
GET /folders/5417fd3575de1f54ee84fc7ae90578e0 200 468ms - 217b
GET /files/5417fd3575de1f54ee84fc7ae9071d1e 200 295ms - 401b
GET /files/5417fd3575de1f54ee84fc7ae9070df5 200 506ms - 414b
POST /files/ 200 3310ms - 280b
POST /files/ 200 3189ms - 266b
GET /folders/5417fd3575de1f54ee84fc7ae90578e0 200 287ms - 217b
GET /files/5417fd3575de1f54ee84fc7ae9072ceb 200 607ms - 399b
GET /files/5417fd3575de1f54ee84fc7ae9071d1e 304 604ms
GET /files/5417fd3575de1f54ee84fc7ae90741df 200 642ms - 408b

Adding the missing file later on is working, and re-uploading the same folder afterward will cause some other files to fail.

I don't see any logic in that behaviour right now, looks like a typical race condition.

Add support for tags

Would be nice to be able to tag files and then to search by tags with queries like .jpg :tag sunset.

Uploading big files is not working

We are investigating this issue and we'll keep you updated as soon as we find something new.

Feel free to let us know if you encounter the bug with as much details as you can like file size, file type, if you use a RaspberryPi, how much disk space you have left, how much memory you have left, data system's and file's logs, etc.

Thanks!

New file not clickable in Shared page

In shared Page, +button for adding new file is doing nothing either on Firefox and Chromium.
As the new dir is working.
My version is up-to-date right now.

[Code] Improving client and server validation

The code itself needs to be cleaned, and there is also work in terms of features: currently there is little to no validation on the server; and the client validation is very limited (you can create folder with "/" in its name).

Align the tags to the right again

@frankrousseau: in your latest change you've put the tags to the left which is really annoying once you have some tags you want to edit because they "jump" when you try to hover them.

I think there are two options here: put them back to the right or put the buttons on the right of the tags, to prevent those shifts.

What do you think?

"upload a new file" window disapear for each upload completion

At each completion, the "upload a new file" window is automatically closed.

I would suggest not to close it at all (even when all files are finished). It's a bit frustrating to have the window closed while still working (eg. looking for other files to upload).

Sharing feature does not work

When I try to share a file or a folder, modal is getting stucked with a "Please wait" message, and console logs me:

Uncaught ReferenceError: data is not defined localhost:9104/apps/files/javascripts/app-0e320272.js:2410
XHR finished loading: GET "http://localhost:9104/apps/files/clearance/5417fd3575de1f54ee84fc7ae90037ed". jquery-1.9.1.js:5
Uncaught ReferenceError: data is not defined modal_share.coffee:24

Improving upload workflow

As noted by @dullroar in #88, the current workflow works great when uploading multiple files at the same time but the modal+"ok" is overkill for just a single quick upload file.

My suggestion would be to have a notification/pop-up alike that can be checked at any time where the user could dismiss the message he gets from the app. Those messages would be related to the upload success or failure.

I think that's the way to handle both single file upload and multiple file upload in a nice way. I have a good idea of how to do it but I'd like to refactor the code first.

Inputs / critics welcome.

Clearance modal improvements

  • when clicking outside : confirm unsaved changes
  • more text : "mail will be sent when you click save"
  • add "add" button as an alternative to enter

Public page for sharing directories is style-less

Not sure if it's a bug or a feature.

The page used when sharing a directory has no style. It's basically the same as the default Apache directory listing page (without the small icons based on the file type).

List upload errors in a modal

When some folders/files have failed to upload, we should have the following message: "blablah.png and 4 other files have failed to upload" with a link a "4 other files" that would show a modal with all failed uploads.

Improving folder creation error handling

When an existing folder is created, the error should be displayed inline and the focus should be set back to the input to match the new "inline upload" workflow.

Share indicator

When I browse my files, I'd like to see if a file is being shared publicly or privately. (1)
We may reuse @mihnea's work on tag (share indicator = "magic" tag?) or a color or icons...I really don't know here.

Public/private distinction will be a good first step, I'd also suggest we add the number of people that have access to the file when it's privately shared. (2)

What do you think of (1) and (2)?

Improving sort algorithm

I suggest that folders are always at the beginning.

Also, I feel like the sort by date is broken.

Better UX for pics and videos

A user suggests:
I think it will be great if we can see picture thumbnails of the files that we've downloaded
Possibility to send the video link and have the other person that we sent to click and it plays immediately without downloading

attachBinary errors not handled

When I upload a new file, if the binary cannot be created and attached for some reason, then the upload should fail and the "File" document shouldn't be created.

Fix: in server/models/file.coffee#File.createNewFile , newFile.destroy if error in the attachBinary callback.

Number of views for shared documents

I would like to see how many times a shared file has been been viewed with a general counter for public sharing and a personal counter for private sharing.

What do you think?

can't upload files after one failure (name collision)

I've tried to upload a file already existing in my uploaded files:

  • the upload window shows an error " : Sorry, a file or folder having this name already exists"
  • the little "loading" animation on the bottom right corner is looping endlessly
  • I can't upload a new file
  • clicking "close" and opening the upload window does not change anything

Generating a big *.zip seems to kill the data-system

When I had few HD rush (~50MB each), maybe 10-20, in a directory.

When clicking on the general Download button, (aka download the whole zip), I then felt on 'Something went wrong' page and the data-system was down.

I need to restart it by hand. The issue was reproductible twice. and on the 'public' link'

multiple selection and grouped actions

Currently, removing a set of files is a bit tedious as one must click and confirm the action for each file individually. This is not a desirable behavior when >10 files are involved :)

Can't delete big file

I've uploaded a big (446MB) file using the File app without any problem but then, I can't delete it.

Here's the sequence of actions (reproducible):

  • hover the mouse and click on the 'delete' icon
  • confirm the deletion and get the following:
    • Popup named 'Error' with 'cancel' as its content
  • click the only button available: Ok
  • The file is not listed anymore
  • do few other operations, come back in the file app to see the file is still here :)

Deleting other files works as expected. Renaming the big file also works.

Guest mode

We've been talking a lot about a "guest mode" when a guest could browse what is shared with it from your Cozy. Since the private and the shared areas now share the most of their code, the implementation in Files can be achieved.

How would it work? Instead of sharing one file or one folder, you'd just share the key and the guest will be able to browse the folders just as if it was actually Cozy's owner, but will only be able to see what is shared with it.
Some functional details I thought about:

  • the guest won't see the public folders/files of the Cozy, just those actually shared with it
  • there won't be a place where a guest can browse all the public folders/files on the Cozy

I'm going to work on that next week based on how many bugs I let in the refactoring. Suggestions/inputs are welcome.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.