Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question - Make auto generated share URLs shorter? #280

Open
jamess60 opened this issue Jul 7, 2023 · 4 comments · May be fixed by #283
Open

Question - Make auto generated share URLs shorter? #280

jamess60 opened this issue Jul 7, 2023 · 4 comments · May be fixed by #283

Comments

@jamess60
Copy link

jamess60 commented Jul 7, 2023

Hi all

My instance has very low volumes of traffic/users, but I quite often use it to move files in/out of vms and remote sessions that I cant always copy paste into.

Is there a way to make the auto generated urls shorter for convenience? Even 2 characters would suffice for my needs

@Maytrok
Copy link

Maytrok commented Jul 18, 2023

hey james,

you may use an bucked id ( ?sid=ab)

I think the code that generate the random id is

function getSid() { // support setting an explicit SID by location search param const match = document.location.search.match(/sid=([^&]+)/); if (match) { return match[1]; } else { return md5(uuid()).toString().substr(0, 12); } }

As you can see it`s a hardcoded length.

@Maytrok Maytrok linked a pull request Jul 23, 2023 that will close this issue
@jamess60
Copy link
Author

Hi @Maytrok - Thanks for sharing!
I see you linked pull #283 - does this mean there is now an ENV for this?

@jamess60
Copy link
Author

I see this was added to the readme! Closing issue :)
PSITRANSFER_RANDOM_DOWNLOAD_SID_LENGTH

@jamess60 jamess60 reopened this Apr 12, 2024
@jamess60
Copy link
Author

@Maytrok

Reopening as I only just found the time to test...

Looks like the #283 merge has conflicts - did it ever go ahead?
I cant see a reference to sid length in the config.js and adding this env to docker compose does nothing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants