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 · 8 comments · May be fixed by #283
Open

Question - Make auto generated share URLs shorter? #280

jamess60 opened this issue Jul 7, 2023 · 8 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

@jamess60
Copy link
Author

Bump - any news on this?

@Maytrok
Copy link

Maytrok commented Jul 5, 2024

@jamess60 the repo owner seems to not care about my PRs and merge other prs that create a merge conflict with mine.
i`ve resolve the conflict now, but i don't have small hopes that the pr will be merged. If you really want that feature, you should be able to clone my forked repo and switch to the 'env-to-shorten-download-url' branch. Note: Ive not tested the docker version

@jamess60
Copy link
Author

Hi @Maytrok

My bad - I honestly thought you were the repo owner given the lack of activity from anyone else! Shame that the project seems to be lacking maintainers as its an awesome bit of software. Thank you for your efforts!

If/When I ever find time, I might be able to help dockerise your fork...

@psi-4ward
Copy link
Owner

I apologize but I really do not have the time anymore to manage all the requests and do much review stuff. Feel free to fork my work and add your features

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.

3 participants