Giter Club home page Giter Club logo

psitransfer's Introduction

PsiTransfer

Current Release Dependencies Known Vulnerabilities Github Stars Docker Stars Image Size Docker Pulls Docker Automated buil Donate

Simple open source self-hosted file sharing solution. It's an alternative to paid services like Dropbox, WeTransfer.

  • No accounts, no logins
  • Mobile friendly responsive interface
  • Supports many and very big files (Streams ftw)
  • Resumable up- and downloads (tus.io)
  • Set an expire-time for your upload bucket
  • One-time downloads
  • Download all files as zip/tar.gz archive
  • Modal-style file preview
  • Requires Node >=7.4 or use --harmony-async-await flag
  • Password protected download list (AES)
  • /admin Page lists bucket information, Screenshot (disabled until you set adminPass config value)
  • Lightweight Vue based frontend apps. Gzipped (on by default) less than 100k
  • Explicit named bucket IDs with query param sid=<myBucketID>

See the blog posts about PsiTransfer: https://psi.cx/tags/PsiTransfer/ and checkout the Documentation

Screenshot

Quickstart

Docker

$ docker run -p 0.0.0.0:3000:3000 -e PSITRANSFER_ADMIN_PASS=secret -v $PWD/data:/data psitrax/psitransfer
# data volume needs UID 1000
$ sudo chown -R 1000 $PWD/data

Specify the version by using image tags e.g.:

  • latest: corresponds to master branch
  • 2: latest stable 2.x.x
  • 1.1: latest stable 1.1.x
  • 1.0.0: exact version

Manual, precompiled

# Be sure to have NodeJS >= 12
$ node -v
v12.4.0

# Download and extract latest release package from
# https://github.com/psi-4ward/psitransfer/releases

# Install dependencies and start the app
$ NODE_ENV=production npm install
$ npm start

Manual, from source

# Compile the frontend apps
$ cd app
$ npm install
$ npm run build

# Install dependencies
$ cd ..
$ npm install
$ npm start

Configuration

There are some configs in config.js like port and data-dir. You can:

  • Edit the config.js (not recommend)
  • Add a config.production.js where production is the value from NODE_ENV See config.dev.js
  • Define environment Variables like PSITRANSFER_UPLOAD_DIR to set the upload directory
  • To secure your PsiTransfer if exposed to the internet from unwanted, non authorized uploads use the PSITRANSFER_UPLOAD_PASS environment variable

Customization

public/pug/upload.pug and download.pug are kept simple. You can alter these files and add your logo and styles. Please keep a footnote like Powered by PsiTransfer :)

Debug

Psitransfer uses debug:

DEBUG=psitransfer:* npm start

Side notes

  • There is no (end-to-end) payload encryption (yet).
  • Download all as ZIP does not support resuming the download.

🌟 Contribution is highly welcome 🀘

Want to say thanks and buy me a beer? Donate

License

BSD

psitransfer's People

Contributors

0xkira avatar adan89lion avatar alaincao avatar alkoholliga avatar bhbarbosa avatar cubox avatar dependabot[bot] avatar dinoue avatar goredhell avatar greecemunky avatar hb-i avatar igneous avatar itthinker1 avatar jcmousse avatar loukash avatar lzrdblzzrd avatar mitakjakub avatar mudzay avatar myde2001 avatar psi-4ward avatar retro64xyz avatar slixor avatar snyk-bot avatar tubalainen 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

psitransfer's Issues

Feature Request: Adjustable Max # Downloads in addition to time-based Retention

Instead of having 'one time download' as a Retention option, would it be possible to make Retention only contain options for time/date expirations, and have a separate option for Max # Downloads where one-time, 2, or however many downloads are stored, either as a dropdown configurable in config.js or as a textbox? Implementing this may deprecate config.js's maxAge setting.

js not loading properly through reverse proxy.

I'm attempting to set up psitransfer through apache2 reverse proxy.
It loads as expected when connecting directly http://dockerip:3000 https://i.imgur.com/X7hAjss.png
It has all kinds of issues when connecting through the proxy. https://i.imgur.com/cdUoHdH.png

Here is the console log from the browser.

 Failed to load resource: the server responded with a status of 404 (Not Found)
 common.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
 upload.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
 common.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
 upload.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
 styles.css:1 Failed to load resource: the server responded with a status of 404 (Not Found)

Happy to provide more information. Thanks.

Upload variants

Provide Endpoints to upload

  • via content-body
  • via multipart/form-data

IE11 download page link not working

Hi, thank you for this great software - so simple, so functional.
I'm testing the application with different browser, i see that in the download page - using IE11 - if i click on the filename nothing happens. Can you help me?
Firefox, chrome, works perfectly.

Admin console

Would be very beneficial to have an admin page in which you could see all shares, share links, days remaining on retention etc. Just a nice enhancement request.

Love this product by the way.

IEx: generating passwords doesn't work

Hello
First of all thank you for this great piece of software!
After playing around and done some configurations I realized, that in IEx 11 the button "generate password" is not working - nothing happens.
Perhaps this is a combined problem with Issue #40 (I can confirm this problem in IEx 11)?

Thanks in advance!
Greetings, Andrew

IE Retention jumps back

In Internet Explorer 11 the Retention selection jump back to the defaults settings after click on upload.

QR Code with bucket URL

Today I was in a situation where it would be useful to have QR code containing download link as a result of uploading (to get link quickly to the phone and send it by SMS).
Maybe as a third button next to "mail" and "copy"... Bad idea?

[Feature Request] Public downloads

I have idea of something called as public downloads.
What is it?
These are the uploads which are shown on server's front page (or any other page), all people can download it. (It can contains password based authentication so that only fee can download but links are open for everyone else to see.)

Branding

Would be interesting to give the possibility to configure a Colorschema for branding the application as:

Logo
Title Page
Colors (now is blu)

Feature Request: Video Preview?

Any chance video preview could be added? Would love basic support for h.264. Think of using this to quickly share files such as edits for review. Love the simplicity of this btw (but lets make it more complex anyway :P )

Cheers,

Send password in SMS

Hi , It's possible to add option to send the encrypt password in sms from the web ?
We have a SMS gateway that can recieve massage in GET protocol .
I want when user upload a file and set a password he put the cellular number of the recipient and the racipient get the password in SMS .

build / start error

Here is my Error-message

psitransfer-1.2.0$ npm start

> [email protected] start /var/www/html/webapps/psitransfer-1.2.0
> NODE_ENV=production node app.js

/var/www/html/webapps/psitransfer-1.2.0/lib/endpoints.js:117
app.get('/files/:fid', async(req, res, next) => {
                            ^
SyntaxError: Unexpected token (
    at Object.exports.runInThisContext (vm.js:78:16)
    at Module._compile (module.js:543:28)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/var/www/html/webapps/psitransfer-1.2.0/app.js:3:13)
    at Module._compile (module.js:571:32)

npm ERR! Linux 4.4.0-93-generic
npm ERR! argv "/var/www/.nvm/versions/node/v7.4.0/bin/node" "/var/www/.nvm/versions/node/v7.4.0/bin/npm" "start"
npm ERR! node v7.4.0
npm ERR! npm  v4.0.5
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `NODE_ENV=production node app.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'NODE_ENV=production node app.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the psitransfer package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     NODE_ENV=production node app.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs psitransfer
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls psitransfer
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /var/www/html/webapps/psitransfer-1.2.0/npm-debug.log

SSL Support

All of my web traffic gets forwarded to ssl, I can't seem to find away to allow psitransfer to listen on HTTPS

Download directly from backend

Does any method for downloading directly from the backend with wget exist? I want to try my connection with psitransfer from a cloud account which only provides me with a console.

Some android phone can not upload

I have 3 android device. 2 of them working fine but my HUAWEI P9(android 7) doesnt work. Only upload not work download works. You can select files,photo,video and click upload button then nothing happen. It may be due to android 7 or HUAWEI P9s security setting I don`t know. Is any logs I can check at server?

Failed to start

$ sudo npm start

> [email protected] start /usr/share/nginx/html/psitransfer-1.2.0
> NODE_ENV=production node app.js

/usr/share/nginx/html/psitransfer-1.2.0/lib/endpoints.js:117
app.get('/files/:fid', async(req, res, next) => {
                            ^

SyntaxError: Unexpected token (
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:549:28)
    at Object.Module._extensions..js (module.js:586:10)
    at Module.load (module.js:494:32)
    at tryModuleLoad (module.js:453:12)
    at Function.Module._load (module.js:445:3)
    at Module.require (module.js:504:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/share/nginx/html/psitransfer-1.2.0/app.js:3:13)

npm ERR! Linux 3.10.0-693.21.1.el7.x86_64
npm ERR! argv "/usr/bin/node" "/bin/npm" "start"
npm ERR! node v6.14.0
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `NODE_ENV=production node app.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] start script 'NODE_ENV=production node app.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the psitransfer package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     NODE_ENV=production node app.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs psitransfer
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls psitransfer
npm ERR! There is likely additional logging output above.

On npm start I'm getting a weird error. Any suggestions? Looks like another user had this issue, but the ticket was closed without explanation.

Thanks!

Feature Request: Custom (or Shortened) Download Links

Hi!

I've been using PsiTransfer for a while now and sometimes I want to transfer files between two computers on the same network but I don't have an account in common or means to copy the download link easily and paste it on the target computer. So I always resort to manually typing the address which is kinda cumbersome.
So having the ability to create custom download links could make it so much easier to remember and type it elsewhere. It also has the added bonus to use vanity urls for important files (e.g. http://server.lan/DellDrivers)

Thanks!

Cancel button not working

Hello,
First of all, thank you for taking your time to build this nice and smooth (web)app :) !

I just found an issue, after upload starts, there is no way to cancel it. Cancel button doesn't work.

Regards,
Andrei

Feature: Multilanguage support

Hello, I have (another) suggestion :)
Any chance of having multiple languages supported? It is just a couple of terms (retention, password, etc...) but might help some users.
UI language preferably configurable in config.*.js file either as constant or with "automatic" option (to use language according to what users browser header reports) with fallback to some default (EN) when browsers language is not available.

Option to hide New Upload button

Can a config option be provided to hide the New Upload button? I ask this as I plan on using PsiTransfer to send files to clients, however I want it to be one-way only (we upload files to share with clients, clients should not upload files to share with us or anyone else).

Our test instance of PsiTransfer is served via an Apache SSL reverse proxy. To prevent clients from uploading files we have only allowed our IP addresses to access location /. Staff will know they need to access / to upload a file, so they should not need the button. The resulting HTTP 403 error users outside of the whitelisted IP addresses receive when accessing / will redirect to our homepage, but I would like the button removed to hinder any inclination they may have of pushing it.

Alternatively, when said option is set to hide the New Upload button, it should appear only when accessing / or an error page resulting from a failed upload.

Proxy with NGINX issue

I've managed to get PsiTransfer running through a proxy using nginx and the ssl conf as shown in your documentation, however, I now get and error

Download bucket not found.

I've tried changing the uploadDir parameter but it doesn't seem to help. Thank you

Fix font issue on Download page

I have noticed that the font size is:

  1. Quite large
  2. Sometimes outside of the "Files" box (see image)
    How can I correct this? I am very new to programming, so my experience is nil.
    download image

No Upload Section

Hi,

I see the logo and the footer, but there is nothing else on the page for some reason. I enabled DEBUG and I don't see any errors. Seems a bit strange... any ideas?

Please and thanks so much!

Can't change retention time on EDGE

Whe you choose a file to upload, you change retention time from default to value you want, press "Upload", file gets uploaded and retention time is restored to default value "1 week".

Feature: Option to send links via email

Hi,

an option to send links from uploaded files via email would be great.
And also an info to the uploader, if the file is first downloaded from the receiver.

Regards
Danny

Feature Request: Create link with upload-ID to send to someone to upload a file

First of all, thanks for such a great and simplistic tool! It almost fits exactly my needs!

Often I have the need, that someone uploads a file for me instead of myself uploading a file for another person. Sure, I can ask the person to go to the initial page, upload the file and send me the Link of the upload and this works usually fine.

But in some cases, it would be even more comfortable, if I just could send this person a link with a pre-generated ID already attached, where they can upload there files and I do not need to get any ID back from them, as I already know, where to expect the uploaded files.

This could especially help with very inexperienced users, who are not very used to insert a link that they have in their clipboard into an e-mail or a chat session.

Thanks for your consideration and best regards!
Patrick

retention issue

Current setup is using the docker container for psitransfer.

I been testing some transfers and it seems like the retention doesn't seem to be working correctly for me. The only one that works is the one-time download. I've tested the week and few hours retention, but the data and folder is still in the Psi-data directory.

Reverse Proxy Compatibility

Hi

I'm using running PsiTransfer on a docker container and I have set up nginx as reverse proxy.
I can access the site but when I try to upload a file I get this error:

tus: unexpected response while uploading chunk, originated from request (response code: 413, response text: <html> <head><title>413 Request Entity Too Large</title></head> <body bgcolor="white"> <center><h1>413 Request Entity Too Large</h1></center> <hr><center>nginx/1.13.0</center> </body> </html> )

if I do the same operation with the IP:Port url it works wonders. Is there something I can do make it work with the reverse proxy?

thanks for your help!

Download confirmation

Would love to see a download confirmation mail when a receiver downloads the file.

Pictures don't seem to load when using reverse proxy

Hi,

I just got psitransfer "working". I installed NodeJS/NPM and I am using apache2 as a reverse proxy. For some reason the pictures on the site itself don't seem to load. Does anyone know how to fix this issue? No errors in NPM or Apache2 logs.

The only files that load are style.css, common.js, upload.js and config.json.
5ef45d76e

Feature: Downloading all files from bucket

If user uploads hundreds of files (photos or whatever) I am not able to download all files at once.
Option to download everything as a zip file would be great.
User could zip them before uploading, but unfortunately for some users this is too complicated.
I can't even use browser addons like DownThemAll as it doesn't "see" the files.
Could any solution for this be found and implemented?
Thanks

Localisation

Hi,

We are interested in hosting your service in our corporation, for internal use. But as we are french, we will translate your application.

Currently, it seems that the only way to do that is to modify the source code. That is probably what we ll do : create our own fork so we can have a french version.

Have you considered putting the vocabulary in some json files in order to be able to have multiple languages without multiple forks ?

How to delete a file?

Hello,

I was testing a few things in psitransfer but I'm having issues with deleting files.

When a user uploads a new file it generates a 12 character string and a folder with that string is created inside the data folder.

I deleted that folder but the link is still valid and there you can see some metadata like the file name, size, etc. The file doesn't exists and can't be previewed or downloaded but the trail is there.

Is there a proper way to delete uploads or am I missing something?

Docker - Can't Specify Port?

Hi,

Tried running the app in a docker container and change -p to 8080:8080, but the app still runs on port 3000. Is it not possible to change the port on the docker container?

Thanks!

Email Alert

Dear ,

Looking to have Email Alert if possible.
Please guide

Thanks,

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.