OneDrive / onedrive-api-docs

Official documentation for the OneDrive API
MIT License
458 stars 232 forks source link

When I set download as action it redirects me to my website (query works) #1592

Closed stevan-borus closed 1 year ago

stevan-borus commented 2 years ago

Category

I am setting the options object like this:

const odOptions = {
      clientId: `${process.env.REACT_APP_ONE_DRIVE_CLIENT_ID}`,
      action: 'query',
      multiSelect: true,
      openInNewWindow: true,
      advanced: {
        redirectUri: 'http://localhost:3000',
        endpointHint: 'api.onedrive.com',
      },
      success: async (results: any) => {
        console.log(results);
      },
      cancel: () => {
        return null;
      },
      error: (error: any) => {
        console.log(error);
      },
    };

When I use it like this the picker opens as it should and I can select the files. Except that way I don't get any kind of url which I can use to download those files. I only get drive and file ids.

When I change the action to download I just get redirected to my website in that new window (no picker). The same thing happens with share. So only query as action works

Why is that happening? Is there a way that I can download those files using drive and file ids with query action?

I need to download the files in order to upload them to a chat.

ghost commented 2 years ago

Thank you for your contribution to OneDrive API Docs. We will be triaging your incoming issue as soon as possible.

patrick-rodgers commented 1 year ago

Hello, the v7.2 Picker is no longer receiving updates, when possible please migrate to the v8 picker, you can ask questions for v8 picker in this issues list.