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

Support to get share link of Business Shared Folder #1227

Closed
eloii23 opened this issue Jan 18, 2021 · 8 comments · Fixed by #1230
Closed

Support to get share link of Business Shared Folder #1227

eloii23 opened this issue Jan 18, 2021 · 8 comments · Fixed by #1230
Labels
Bug Something isn't working Fixed

Comments

@eloii23
Copy link

eloii23 commented Jan 18, 2021

Hi again,
i've raised this issue #1219 because I'm not able to get the share link of a file that I've uploaded to my Business Shared Folder.

From your answer I understand that it is possible, but I'm doing it wrong. Can you help me to understand how I have to configure my onedrive client to be able to get a share link of a file uploeaded to a Business Shared Folder?

I remark that I'm already able to upload files to the Business Shared Folder, but the problem is that I don't know how to get it's share link.

Best regards,
Eloi.

@abraunegg
Copy link
Owner

abraunegg commented Jan 19, 2021

@eloii23
I have finally been able to look into this issue, and as such I am marking this as a bug with this feature.

Please can you also test the following PR when generating the debug log:

git clone https://github.com/abraunegg/onedrive.git
cd onedrive
git fetch origin pull/1230/head:pr1230
git checkout pr1230
./configure; make clean; make;

To run the PR, you need to run the client from the PR build directory:

./onedrive <any options needed>

When running the PR, your version should be: onedrive v2.4.9-7-gf83d2c5 or greater.

Specifically to your issue, as an example:

.
├── 50k_random_files -> /home/alex/50k_random_files
├── random_files -> /home/alex/OneDrive/random_files
├── random_images -> /home/alex/OneDrive/random_images
├── random_videos -> /home/alex/OneDrive/random_videos
└── Top\ Folder  <--- This is a OneDrive Business Shared folder which is in-sync with OneDrive / local file system
    ├── asdfasdf
    │   └── qwerksdjfg.txt
    └── asdfasdfs.txt

6 directories, 2 files
./onedrive --confdir '~/.config/onedrive-business/' --list-shared-folders
Configuration file successfully loaded
Configuring Global Azure AD Endpoints
Initializing the Synchronization Engine ...

Listing available OneDrive Business Shared Folders:
---------------------------------------
Shared Folder:   Top Folder
Shared By:       test user
---------------------------------------
Shared Folder:   Sub Folder 2
Shared By:       test user (testuser@<redacted>)
./onedrive --confdir '~/.config/onedrive-business/' --get-file-link './Top Folder/asdfasdfs.txt'          
Configuration file successfully loaded
Configuring Global Azure AD Endpoints
https://<redacted>/Documents/Top%20Folder/asdfasdfs.txt

@abraunegg
Copy link
Owner

@eloii23
Any update in testing this PR?

@eloii23
Copy link
Author

eloii23 commented Jan 20, 2021

Hi @abraunegg ,
sorry but finally I found another way to do what I need (I was trying to get the link to send it through email, but I can do it on OneDrive with Power Automate). In any case, if you need I can test it in a staging environment as soon as I can.
Let me know if you need that.

Regards!

@abraunegg
Copy link
Owner

@eloii23

If you can test that would be greatly appreciated. Will merge this into 'master' as I have tested as per above, so you will be able to just rebuild and install 'master' to get this fix.

@eloii23
Copy link
Author

eloii23 commented Jan 21, 2021

He @abraunegg ,
I tested it from the PR v2.4.9-10-g0bbf162 and I get the file link now:
image

I have to say that when I copy this link on web browser, I only get a blank page and I don't understand if it should be the correct behaviour. In any case, as I said, I don't need this feature running so it isn't critically for me but I send you the info in case it helps you.

Best regards and thanks for the fast reply.
Eloi.

@abraunegg
Copy link
Owner

@eloii23

I tested it from the PR v2.4.9-10-g0bbf162 and I get the file link now:
image

I have to say that when I copy this link on web browser, I only get a blank page and I don't understand if it should be the correct behaviour. In any case, as I said, I don't need this feature running so it isn't critically for me but I send you the info in case it helps you.

Best regards and thanks for the fast reply.
Eloi.

The file download link is what OneDrive itself creates. If the link provided is incorrect, does not work, then you need to feed this back to Microsoft as that is not an issue with this client at that point. We request the URL for the file - that is all.

@eloii23
Copy link
Author

eloii23 commented Jan 21, 2021

Ok, thanks for the explanation :)

Best regards!

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Something isn't working Fixed
Projects
None yet
2 participants