filegator icon indicating copy to clipboard operation
filegator copied to clipboard

Add Link sharing feature

Open genlink opened this issue 6 years ago • 8 comments

Would you please add link sharing feature?

Sometimes we need to share files with some one , who do not have account or their account have diffirent path so they can not access the file

genlink avatar Aug 03 '19 15:08 genlink

I'm looking to add a sharing feature similar to this https://www.screencast.com/t/vqIdgQzj2Nl6

Willing to fund development if cost is reasonable. Thanks.

ned-code avatar Aug 04 '19 14:08 ned-code

Hi guys, thanks for your feedback.

You can achieve a basic sharing feature with Guest account by enabling 'download' permissions on this account. You can use 'copy link' from the file menu to get the direct link but it will only work for files under the guest account.

Example link from the demo: https://demo.filegator.io/?r=/download&path=L0ltYWdlcy9hbmltYWxzLmpwZWc%3D

Full sharing feature as @ned-code suggested would be great but it requires a lot of customisation and probably a database as a mandatory requirement.

I prefer to keep this simple and extract the sharing feature into a separate plugin of some sort. Suggestions are welcome.

alcalbg avatar Aug 05 '19 07:08 alcalbg

Notes about link sharing feature after reviewing some feedback:

Current status and limitations:

  • The script works as a “view” to the real file system
  • Files are not linked to database records, we must read the fs every time to obtain the file/folder status
  • Files can be changed out of the script’s context (e.g. directly with ftp)
  • The script doesn’t know if something else has changed the file unless some kind of expensive ‘read all files’ operation is issued

What is needed for consistent file-sharing:

  • Files mapped to shares (with a database of some sort)
  • Tracking of file changes (move, rename, delete) and syncing shares accordingly while keeping the same links

What can be done to mitigate limitations:

  • On each link hit, check and remove the share if the underlying file is missing
  • Warn the user if he attempts to change the file which is shared
  • Warn the user if he attempts to change the directory that contains shared files

Nice to have features:

  • Link expiration
  • Link ownership
  • Link revocation (by admin/owner)
  • Links with password or links mapped to users
  • Generate file preview or immediately start download
  • Recognisable links (see the file name in the link itself)
  • Link to folders
  • Direct links that don’t need this script to work (e.g. direct link to s3 file)

alcalbg avatar May 07 '20 07:05 alcalbg

hi @alcalbg a notes about sharing feature: please do not realy on the shit of the apache2 webserver.. using rewite rules! that's all

mckaygerhard avatar Jun 06 '20 13:06 mckaygerhard

Hello is there à solution to force login when we send the download link for a protected element. Actually if you are not logged we receive a not found message. The link works if the user are logged

Regards

fredbast avatar Jun 23 '20 07:06 fredbast

Understanding the limitations, the following would be a good method for me at least. Could it be considered or even implementable already?

  • Using an account that is password protected, but the user and password can be shared (Compromise between public and private).
  • Can send link with username in GET parameters.
  • On open link, if logged in with allowed user, download, if logged in with disallowed user Not Found, if not logged in, go to login page with username set in username input element.

The above isn't perfect, but it would at least prevent content being easily accessible by anybody. If too many people end up knowing the password, the password could be changed or a new user or multiple users could be created for sharing. Obviously, these sharing accounts would have read only / download permissions only.

goldingdamien avatar Mar 28 '23 00:03 goldingdamien

Hello is there à solution to force login when we send the download link for a protected element. Actually if you are not logged we receive a not found message. The link works if the user are logged

Regards

Would also really like this. Following for updates

natechoiniere avatar Sep 01 '23 12:09 natechoiniere

Yep, still having the same issue 'not found' when sharing links with not logged users

sorcer1122 avatar Mar 17 '24 14:03 sorcer1122