jonathantreffler / sharerenamer Goto Github PK
View Code? Open in Web Editor NEWA simple Nextcloud app that lets you customize file/folder share links
License: GNU Affero General Public License v3.0
A simple Nextcloud app that lets you customize file/folder share links
License: GNU Affero General Public License v3.0
How can i delete a Link?
I deleted a folder that was still shared and now I cannot use the same link
Thank you
NextCloud supports to add multiple "Share Link"(s), imagining a user created several Share Link for the same resource, but having different permissions, they all displayed same. When this user wants to edit one of them, will have to click/and open them one by one to find out the link needed to edit.
If user can name those "Share Link"(s) to different meaningful text, will be a great improvement to the experiment.
It will be something like this:
Hi,
No doubt it is a very useful app, thank you for that. ๐:sparkles:
Is there a way to use this in NextCloud Mobile App ? I installed it today on my NextCloud server. On browser, I am getting the option to rename shared link but in NC Android App, if I click share, it doen't give me any option to rename the link.
If a folder is shared and the link is named with the name of a user it does not work and the error is not notified.
If you open the sidebar and share a file, and then switch to the Share Renamer tab of the sidebar, it'll show up as blank until you refresh the page. Or go to another file and come back. It should ideally refresh its "knowledge" of the file's sharing status when the Share Renamer tab is switched to, instead of upon sidebar opening (which I assume is what's happening now).
I'm using Nextcloud 17.0.0 with ShareRenamer 2.7.3.
I've previously created some shares and renamed them with the app. These shares have since been removed as shares, reshared and the directories are deleted. I've also removed the from the "Deleted files", as it was the problem on other issues posted here.
Now if I create a new directory, with the same name as a previous share, it immediately shows up under "Shares" (Menu on the left) and I can not reuse any share names.
Link 'test' already exists. Please choose another link name.
How can I fix this behavior?
The current latest version of Nextcloud is 27.1.3 this app currently only supports version 26, an example error from the nextcloud.log
(cat nextcloud.log | tail -n1 | jq
):
{
"reqId": "XXX",
"level": 4,
"time": "2023-11-10T12:48:54+00:00",
"remoteAddr": "XXX",
"user": "XXX",
"app": "sharerenamer",
"method": "POST",
"url": "/apps/text/session/push",
"message": "Error during app loading: Autoload path not allowed: /nextcloud/apps/sharerenamer/appinfo/application.php",
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/119.0",
"version": "27.1.3.2",
"exception": {
"Exception": "OCP\\AutoloadNotAllowedException",
"Message": "Autoload path not allowed: /nextcloud/apps/sharerenamer/appinfo/application.php",
"Code": 0,
"Trace": [
{
"file": "/nextcloud/lib/autoloader.php",
"line": 166,
"function": "isValidPath",
"class": "OC\\Autoloader",
"type": "->"
},
{
"function": "load",
"class": "OC\\Autoloader",
"type": "->"
},
{
"file": "/nextcloud/lib/private/AppFramework/Bootstrap/Coordinator.php",
"line": 217,
"function": "class_exists"
},
{
"file": "/nextcloud/lib/private/App/AppManager.php",
"line": 400,
"function": "isBootable",
"class": "OC\\AppFramework\\Bootstrap\\Coordinator",
"type": "->"
},
{
"file": "/nextcloud/lib/private/App/AppManager.php",
"line": 216,
"function": "loadApp",
"class": "OC\\App\\AppManager",
"type": "->"
},
{
"file": "/nextcloud/lib/private/legacy/OC_App.php",
"line": 126,
"function": "loadApps",
"class": "OC\\App\\AppManager",
"type": "->"
},
{
"file": "/nextcloud/lib/base.php",
"line": 1048,
"function": "loadApps",
"class": "OC_App",
"type": "::"
},
{
"file": "/nextcloud/index.php",
"line": 36,
"function": "handleRequest",
"class": "OC",
"type": "::"
}
],
"File": "/nextcloud/lib/autoloader.php",
"Line": 141,
"message": "Error during app loading: Autoload path not allowed: /nextcloud/apps/sharerenamer/appinfo/application.php",
"exception": {},
"CustomMessage": "Error during app loading: Autoload path not allowed: /nextcloud/apps/sharerenamer/appinfo/application.php"
}
}
I see this in log:
Only variables should be passed by reference at /var/www/nextcloud/apps/sharerenamer/db/sharerenamermapper.php#30
Nextcloud 17rc1
Php7.3
Apache 2.4
Sadly, I cannot maintain this app any further.
The app is only compatible up to Nextcloud 17. It will probably need some changes in the Nextcloud core code in order to make it compatible to Nextloud 18+.
Because I don't have the time to maintain this project any further, I'm looking for a new maintainer. If you're interested, please reply on this issue or contact me.
ShareRenamer lets me create a long share name (35 character places), and when I select copy link icon, it copies the entire long link which doesn't work. The original link will work however if I truncate the url to 32 character places, so the link that is created has actually already been truncated to 32 character places, but the copy link icon generates an incorrect url.
It would be a great feature, if the share renamer would not only work in "file" mode, but also in "gallery" mode.
It does work with renaming it in "file" mode and using/copying the link in gallery mode. But you can't generate/rename the link directly in gallery mode.
For example:
Thank you @JonathanTreffler for this great and useful app!
Would it be possible to make it compatible with the new Nextcloud 26 (Hub 4).
In my case, it is one of the apps that keeps me from upgrading.
Nextcloud 26.01 installed on Ubuntu 22.04 LTS, full manual installation.
ShareRenamer was disabled after my upgrade from 25.06 to 26.01, and while I can enable it and it briefly appears in the active Apps list, it is almost immediately silently disabled again. I have tried uninstalling and reinstalling the app, and restarting the server, with no effect. No other apps show this behavior. I have installed ShareRenamer directly from the App Store.
Great project, and thank you for continuing it!
Does not work NC19
This is a great feature! It's just what I was looking for. It works great on files in the Files app:
But we use other share links too, like shared Forms (using the Forms app):
shared Polls (using the Polls app):
and shared Calendars:
(We also use Deck, but that doesn't support Share Links (only sharing with a Nextcloud group) so I won't ask about it)
None of these share links can be renamed by sharerenamer.
I suspect I might be asking for a painfully tall order here, but is there a way to make this work with all share links, not just Files? The generated share links all look similar, except where files are like https://example.org/s/DrKci3ampPZmcKj, Forms are like https://example.org/apps/forms/s/DrKci3ampPZmcKj.
Thanks a lot whether or not you have any insight here!
Would be nice if it was possible to search links through the nextcloud search. Clicking a result would then lead directly to the shared folder. Is something like this planned?
Sometimes we only know the "public link" but forgot where the actual folder is on the server.
Hello, thanks for your work!
I think instead of using a separate tab for the functionality the app provides, it would be cool if your could use the API that was introduced for and is used by the downloadlimit app:
nextcloud/server#28835
For one of the renamed links, I get the error mentioned above. Deleting and recreating does not have an effect.
The log shows:
[webdav] Error: Requested uri (/public.php/dav/files/blad-de-scheidsrechter/) is out of base uri (/public.php/dav/files/blad/)
PROPFIND /public.php/dav/files/blad-de-scheidsrechter/
from by -- at 17 jul 2024 21:13:10
Hello, are there any plans to make your awesome plugin available in NextCloud 27?
Thanks in advance.
After renaming a Link neither the original Link nor the renamed one work. If I deactivate Shareramer the renamed Link is working.
That's a bit strange and it would be fine if you could have a look at it.
Steps to follow to produce the problem:
Problem: The web page notice that this name it's in use.
Suggestion of improvement:
A little box asking to overwrite the share link or overwrite directly
Hello,
I know that sharerenamer does not work for new links with NC18+, but will updating NC17 retain current working/renamed links?
Not really an issue, but we have customers that fear that updating will break their current links.
Kind regards.
I just setup NextCloud for a new project. I always install Sharerenamer for all my NextCloud instances. However, in NC v28.0.2 when I enable the extension, go to a folder, share it, the Sharerenamer icon does not show. There is no way to create a new share link.
Better visualization of messages (e.g. when link already exists).
it's possible to assign same share name to different items
The off topic guessable security topic has become a request as suggested by DecaTec !!! Justed need to wait for NC18 fix first !!! Off course.
You want security over "guesslinks", add f2a, or yubikey or password... no random odd policy from the past like the laughable "guesslink" reason...
humour mode on: in case of extra security needed against "guesslink", use a scissor... cut down the link.
Hi,
Any chance to cleanup token id database ? every time I try to rename a link ti says: a link share with that token already exist
Does it work for you?
The ShareRenamer 2.7.3 is marked as installed and active on my NextCloud 19.0.0 but it doesn't show up in the detail view of a file.
Is this going to be updated for 14? Just wanted to check.
Hello,
many thanks for your great work with this tool.
Today we have an issue with the reuse of a share name. First, we had a group folder wich was shared like a simple dropit folder. We gave it a simple share name. Because we had some issues with the folder we decide to unshare and delete it. After that we created a new normal folder and shared as a dropit folder too. As we tryed to rename the share identically with the name of the deleted groupfolder share name before, we get the message that the share name is allready used.
How can we reuse a share name such as in our case after unshared an other share?
I use curl
to batch create shares via the OCS Share API: https://docs.nextcloud.com/server/latest/developer_manual/client_apis/OCS/ocs-share-api.html#create-a-new-share
Is there anything similar possible when using this app to batch rename the shares?
App should be flagged as incompatible with NC18+ seeing as it doesn't work there as referenced in #21.
Currently it's an available app to download with no warning message re: deprecation of function.
The app needs to be changed due to changes in NC 18 (share API), see nextcloud/server#15719 and nextcloud/socialsharing@931efc9.
Hey,
how can I delete used links?
deleted a link and now I cant use the same name again for a new folder.
thx
When I click the copy link button I want to have the corresponding link in my clipboard
When I click on the context menu button I want to see the permissions set for that link
Bonus: I want to see which link is which without clicking on rename to see the placeholder name
Both links end with rab
I only see the permissions for the rab-Link, the bar-Link has none of the radio-buttons marked
Operating system:
Debian 9
Linux 4.9.0-9-amd64 #1 SMP Debian 4.9.168-1 (2019-04-12) x86_64 GNU/Linux
running the dockerhub "nextcloud" image
Web server:
Nginx running in nextcloud image
Database:
Mariadb running in nextcloud image
PHP version:
PHP 7.3.8 (cli)
Nextcloud version: (see Nextcloud admin page)
Nextcloud 16.0.4
Updated from an older Nextcloud/ownCloud or fresh install:
N/A
Where did you install Nextcloud from:
using this docker-compose.yml file:
version: "3.6"
networks:
databases:
volumes:
nextcloud:
mysql:
services:
nextcloud:
image: nextcloud
container_name: nextcloud
restart: always
ports:
- "9009:80"
networks:
- databases
volumes:
- nextcloud:/var/www/html
environment:
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- MYSQL_PASSWORD=***REMOVED SENSITIVE VALUE***
- MYSQL_HOST=mariadb
- REDIS_HOST=redis
redis:
image: redis
restart: always
networks:
- databases
mariadb:
image: mariadb
restart: always
networks:
- databases
environment:
- "MYSQL_ROOT_PASSWORD=***REMOVED SENSITIVE VALUE***"
- "MYSQL_DATABASE=nextcloud"
- "MYSQL_USER=nextcloud"
- "MYSQL_PASSWORD=***REMOVED SENSITIVE VALUE***"
volumes:
- mysql:/var/lib/mysql
Signing status:
No errors have been found.
List of activated apps:
Enabled:
- accessibility: 1.2.0
- activity: 2.9.1
- bruteforcesettings: 1.4.0
- calendar: 1.7.0
- checksum: 0.4.3
- cloud_federation_api: 0.2.0
- comments: 1.6.0
- dav: 1.9.2
- deck: 0.6.6
- drawio: 0.9.3
- federatedfilesharing: 1.6.0
- federation: 1.6.0
- files: 1.11.0
- files_3d: 0.1.0
- files_automatedtagging: 1.6.0
- files_fulltextsearch: 1.3.6
- files_markdown: 2.0.6
- files_mindmap: 0.0.13
- files_pdfviewer: 1.5.0
- files_rightclick: 0.13.0
- files_sharing: 1.8.0
- files_texteditor: 2.8.0
- files_trashbin: 1.6.0
- files_versions: 1.9.0
- files_videoplayer: 1.5.0
- firstrunwizard: 2.5.0
- flowupload: 0.1.2
- fulltextsearch: 1.3.6
- gallery: 18.3.0
- impersonate: 1.3.0
- logreader: 2.1.0
- lookup_server_connector: 1.4.0
- mail: 0.15.2
- nextcloud_announcements: 1.5.0
- notifications: 2.4.1
- oauth2: 1.4.2
- password_policy: 1.6.0
- phonetrack: 0.5.2
- privacy: 1.0.0
- provisioning_api: 1.6.0
- recommendations: 0.4.0
- serverinfo: 1.6.0
- sharebymail: 1.6.0
- sharerenamer: 2.6.1
- support: 1.0.0
- survey_client: 1.4.0
- systemtags: 1.6.0
- theming: 1.7.0
- twofactor_backupcodes: 1.5.0
- updatenotification: 1.6.0
- viewer: 1.1.0
- workflowengine: 1.6.0
Disabled:
- admin_audit
- encryption
- files_external
- user_ldap
Nextcloud configuration:
{
"system": {
"memcache.local": "\\OC\\Memcache\\APCu",
"apps_paths": [
{
"path": "\/var\/www\/html\/apps",
"url": "\/apps",
"writable": false
},
{
"path": "\/var\/www\/html\/custom_apps",
"url": "\/custom_apps",
"writable": true
}
],
"memcache.distributed": "\\OC\\Memcache\\Redis",
"memcache.locking": "\\OC\\Memcache\\Redis",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"port": 6379
},
"instanceid": "***REMOVED SENSITIVE VALUE***",
"overwritehost": "singinwhale.com",
"overwritewebroot": "\/cloud",
"overwriteprotocol": "https",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"singinwhale.com"
],
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"dbtype": "mysql",
"version": "16.0.4.1",
"overwrite.cli.url": "http:\/\/singinwhale.com",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "",
"dbtableprefix": "",
"mysql.utf8mb4": true,
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"loglevel": 2,
"maintenance": false,
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"mail_smtpmode": "smtp",
"mail_sendmailmode": "smtp",
"mail_smtpauthtype": "LOGIN",
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpauth": 1,
"mail_smtpport": "465",
"mail_smtpname": "***REMOVED SENSITIVE VALUE***",
"mail_smtppassword": "***REMOVED SENSITIVE VALUE***"
}
}
Are you using external storage, if yes which one: local/smb/sftp/...
No
Are you using encryption: yes/no
No
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
No
Browser:
Vivaldi 2.6.1566.44 (Stable channel) (32-bit)
Revision b104196d10e5b12a2690fe28e511909c2f4dcf4b
JavaScript V8 7.5.288.23
Flash (Disabled)
User Agent Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.102 Safari/537.36 Vivaldi/2.6.1566.44
Command Line "C:\Program Files (x86)\Vivaldi\Application\vivaldi.exe" --flag-switches-begin --flag-switches-end --save-page-as-mhtml
Executable Path C:\Program Files (x86)\Vivaldi\Application\vivaldi.exe
Profile Path C:\Users\Manuel\AppData\Local\Vivaldi\User Data\Default
Operating system:
Windows 10 OS Version 1809 (Build 17763.678)
N/A
{"reqId":"UGa8yd07HPFfcrWBHBR5","level":3,"time":"2019-08-18T11:43:19+00:00","remoteAddr":"80.155.133.42","user":"singinwhale","app":"PHP","method":"POST","url":"\/cloud\/index.php\/apps\/sharerenamer\/rename","message":"Only variables should be passed by reference at \/var\/www\/html\/custom_apps\/sharerenamer\/db\/sharerenamermapper.php#30","userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/77.0.3835.0 Safari\/537.36","version":"16.0.4.1"}
N/A
Hi, thanks for keeping this great app alive!
Please consider adding the ability to send a URL to a YOURLS instance via their API, which is fully open source and coded in PHP.
Here is the API documentation. And more general API and Hook documentation + info on the Passwordless API
Thanks either way!
Just installed sharerenamer on Nextcloud 18. I don't see the edit field where you would enter the share's name. Happy to provide more details on request.
I changed the share token to a human readable word. All works fine, exception one thing!
I'f I copy the new link the new human readable accesstoken/name ist copied, but If I klcik on share via eMail, the old share token will be used! :/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.