Share via

My university provides OneDrive. How to get permanent links so that multiple students automatically download datasets using CURL?

Anonymous
2023-10-05T12:22:10+00:00

OneDrive allows obtaining an URL to a ZIP file (dataset). However, that URL is intended for graphical user interfaces, typically browsers. That URL fails in a command line usage with CURL (Windows, MacOS, Linux).

Microsoft 365 and Office | OneDrive | For education | Other

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

4 answers

Sort by: Most helpful
  1. Anonymous
    2023-10-08T10:51:51+00:00

    Dear George,

    thanks for the answer, but I find too limiting having to list all students to have access to datasets.

    The most common situation is a dataset being used for a time to develop a software solution and, later, other students coming to improve the software starting the work with the original datasets. After three or four groups of students, each one starting on old datasets, and creating novel datasets, the maintenance on the access lists gets too cumbersome.

    I understand many, maybe most, uses of OneDrive require privacy. But there are also many cases simply requiring ease of access. Our datasets have no privacy concerns, can be made public. Permanent links without need of authorized access would be our desired way to go.

    Thanking once more the reply you already sent,

    J. Gaspar

    Was this answer helpful?

    2 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2023-10-11T22:07:54+00:00

    Hello George,

    thanks for your answer. I am already using the method “Anyone link gives access to anyone who receives this link” for uploading datasets. However, I need the students be able to do automated downloads.

    Detail: Allowing students to download datasets to arbitrary folders in their PCs typically imply experiments (software) containing absolute paths to the datasets. Absolute paths usually imply software that does not run immediately in other PCs.

    I may use alternatives to CURL. In essence I can consider any command line program that works in Windows, MacOS or Linux, and allows programming a specific download location. Any suggestion in this regard?

    Thanks once more for your attention,

    J. Gaspar

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  3. Anonymous
    2023-10-10T12:32:58+00:00

    Hi Jose,

    Thanks for posting back.

    If you accept not using the Curl command to download OneDrive files, then you can share OneDive files by using the Anyone link (Anyone link gives access to anyone who receives this link), and no need to enter students' accounts. After that, students can access the link and manually download the OneDrive file. Also, if you want to reuse this link, you can go to OneDrive for Web, select the file, three points, Manage Access, Links, and copy the Anyone link.

    Sincerely,

    George | Microsoft Community Moderator

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2023-10-05T16:36:19+00:00

    Hi Jose,

    Thanks for posting in the community. We are happy to help you.

    Based on my test, please view the following information.

    1. Based on my test, it is not possible to use the shared link of a OneDrive file with the Curl command to download the OneDrive file.
    2. To achieve your needs, you need to use the path (the permanent link) of the OneDrive file with the Curl command to download the file. To get the path (the permanent link) of the OneDrive file, you can go to OneDrive for Web (go to www.office.com and select the OneDrive icon in the left sidebar), select "My files", select the file, three points, Details, in the Details pane, click the Path button to copy the path.
    3. To access the path of the OneDrive file and download it, OneDrive requires authentication. It means students need to sign into their accounts, and their accounts need to have permissions for this file. So, you need to share the file with multiple students' accounts, and the students need to use the Curl command with authentication.

    Based on the above points, to achieve your needs, you need to share the file with students' accounts. Make sure each student's account has permission to download it. Students need to use the following Curl command. They need to edit the Italic part.

    Curl -u username:password -OL https://…(the path of the OneDrive file)

    We look forward to your response. Thanks for your cooperation.

    Sincerely, 

    George | Microsoft Community Moderator

    ImageImage

    Was this answer helpful?

    0 comments No comments