Onedrive-api-docs: URL upload not supported for OneDrive business

Created on 29 Jul 2019  路  9Comments  路  Source: OneDrive/onedrive-api-docs

I keep receiving the 'URL upload not supported for OneDrive business' error when passing a dataUri option to OneDrive.save().

The documentation says data URI works for OneDrive business, so this error seems to counter that.

For context, I am wanting to save a .txt/.rtf file created from an online text editor to OneDrive, so I don't have access to using input type=file, I can only upload either as a URL to the .txt/.rtf file or a data URI.

Investigation Picker bug

All 9 comments

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

OneDrive Business does not support the service that OneDrive Personal provides whereby you can give it an arbitrary, internet accessible, URL and it'll be downloaded to your drive. It should, however, support being provided with a data URI.

It may be that the picker is applying the restriction for the former on the latter.

@ClaroJack, can you provide your Picker configuration options used or better yet a repro branch for us to debug?

cc: @aditima @margoflynn

Here is the function I am executing,

            OneDrive.save({
                clientId: 'MY_CLIENT_ID',
                action: 'save',
                sourceUri: 'data:' + mimeType + ';charset=utf-8;base64,' + btoa(content),
                fileName: filename,
            })

Has there been an update on this? I still get this error when passing a data URI in sourceUri.

Clarojack - any resolution? Seeing the same thing here...

Bump I am getting the same thing. Data uri not web url.

Even me, I m getting the same issue....found no solution anywhere

I was able to get around this by removing the offending API check. See my commit here.

This seems to work okay for me, but there's no guarantee it doesn't break other things. Obviously an official fix would be preferred here. Until then, here's the CDN URL if you want to use my fork:
<script src="https://cdn.jsdelivr.net/gh/sweetgiorni/onedrive-file-picker@26b28ba/OneDrive.js"></script>

Was this page helpful?
0 / 5 - 0 ratings

Related issues

marcreicher picture marcreicher  路  3Comments

rkulow picture rkulow  路  7Comments

ANorwell picture ANorwell  路  7Comments

brownbl1 picture brownbl1  路  10Comments

upxact picture upxact  路  9Comments