Giter Site home page Giter Site logo

onedrive-explorer-win's People

Contributors

bcsanches avatar peternied avatar rgregg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

onedrive-explorer-win's Issues

Upload Large File with Error

When I tried to upload a large file more than 100M with the "Upload" -> "Large File" menu option, I get the following error:

OneDrive reported the following error:
code:
message: Exception of type 'OneDrive.ODServerException' was thrown.
{
"error": {
"code": "invalidRequest",
"message": "Invalid API or resource",
"innererror": {
"code": "generalException"
}
}
}

Class ODSerializationException

Class ODSerializationException is missing the initialization of JsonData.

Here is the update:

    internal ODSerializationException(string message, string jsonData, Exception innerException = null)
        : base(message, innerException)
    {
        JsonData = jsonData;
    }

ParentReference.Path for all items returned by ViewChangesAsync is always null?

I am calling ViewChangesAsync to get a list of changes, but in the resulting list of items all of the ParentReference.Path fields appear to be null. I can reconstruct the parent path manually by maintaining a dictionary of ParentReference.Id's and their associated paths as I process the list, but is this expected behavior?

OneDrive forces "Open in New Window" Behavior

My system is Windows 10 with OneDrive for Business.

Anytime I right-click and Open the Documents directory in File Explorer two things happen:

  1. The Documents directory is opened within the same occurrence of Windows Explorer, which is the expected behavior.
  2. In addition a second File Explorer window is launched that places me in my OneDrive location (_C:\Users\MyUserID\OneDrive - Business_). This is unexpected behavior as I don't need this second window opened and am constantly forced to close it. Why does this happen and how do I disable it?

This issue only started just after I installed OneDrive for Business. I installed OneDrive for Business and synced my OneDrive to my Documents. I did this by right clicking on my Documents folder, selecting Location and entering C:\Users\MyUserID\OneDrive - Business\Documents and hitting OK.

Replacing the content of an existing item raises an ODServerException

An attempt to replace the content of an existing file item via the "Upload/Replace Selected Item..." menu option in OneDrive API Explorer results in an ODServerException:

{
  "error": {
    "code":"",
    "message":"The request entity's media type 'application/octet-stream' is not supported for this resource."
  }
}

When I suppress the explicit ContentType declaration in ODConnection.UploadToUrl()

private async Task<ODItem> UploadToUrl(Stream sourceFileStream, ItemUploadOptions options, long localItemSize, Uri serviceUri)
{
  var request = await CreateHttpRequestAsync(serviceUri, ApiConstants.HttpPut);
  //request.ContentType = ApiConstants.ContentTypeBinary;

  options.ModifyRequest(request);

  ...

the ODServerException turns into

{
  "error": {
    "code":"",
    "message":"The request contains an entity body but no Content-Type header. The inferred media type 'application/octet-stream' is not supported for this resource."
  }
}

I did not find any details on supported media types or any binary/text encoding requirements for file content uploads in the OneDrive API documentation.

Replacing the entire file via the "Upload/New File In Current Folder" menu entry works, though.

Feature: Sync metadata - file attributes

Would be really useful if OneDrive sync the associated file attributes such as; hidden and read-only flags (at least these basic ones), and expose it to the API as well.

Currently, if you have a read-only or hidden file on a device, after syncing it loses those attributes on the other (except for the timestamp).

Downloading File Causes "A Task was canceled" Exception

When I try to download a file about 130M in size, the sample eventually throws an exception of "A Task was canceled".

Also, both download and upload files should support cancellation and progress report. Currently, only uploading large file support progress report.

Which Call Returns ODUserProfile?

Which call returns an object of ODUserProfile? Why class ODUserProfile in its own namespace of "OneDrive.DataType", while no other class is in that namespace? Thanks!

Folder Paths contain %20

When you call ODItem.Path(true), if the folder has a space in it, the path has %20 instead of the space. However, when we pass in the path to an ODItemReference, we can pass it in without the URL encoding of the space and it works - ideally it should be the same both ways (there should be no encoding) since we cannot compare what we put in with what we get out...

Build Error

I can't build it.

I have a VS 2012 Pro. Let me know build process.

Unknown failure on large file upload.

Hi,

Great little api.

However, when uploading a large video (360mb) using UploadLargeFileAsync, I get a thrown objectdisposedexception. Reliability is high with smaller files, so not sure what is causing this.

Using Mono on Android 16, with version 1.0 of the portable class library.

Stack trace :
" at System.Net.WebConnection.EndWrite (System.Net.HttpWebRequest request, Boolean throwOnError, IAsyncResult result) [0x00000] in :0 \n at System.Net.WebConnectionStream+c__AnonStorey2.<>m__1 (IAsyncResult r) [0x00000] in :0 \n--- End of stack trace from previous location where exception was thrown ---\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in :0 \n at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1+ConfiguredTaskAwaiter[System.Net.WebResponse].GetResult () [0x00000] in <filename unknown>:0 \n at System.Net.Http.HttpClientHandler+<SendAsync>c__async0.MoveNext () [0x00000] in <filename unknown>:0 \n--- End of stack trace from previous location where exception was thrown ---\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0 \n at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1+ConfiguredTaskAwaiter[System.Net.Http.HttpResponseMessage].GetResult () [0x00000] in :0 \n at System.Net.Http.HttpClient+c__async0.MoveNext () [0x00000] in :0 \n--- End of stack trace from previous location where exception was thrown ---\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in :0 \n at System.Runtime.CompilerServices.TaskAwaiter1[System.Net.Http.HttpResponseMessage].GetResult () [0x00000] in <filename unknown>:0 \n at OneDrive.WrappedHttpClientRequest+<GetResponseAsync>d__3.MoveNext () [0x0003f] in e:\\Work\\onedrive-explorer-win-master\\OneDriveSDK\\Http\\WrappedHttpClient.cs:52 \n--- End of stack trace from previous location where exception was thrown ---\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0 \n at System.Runtime.CompilerServices.TaskAwaiter1[OneDrive.Http.IHttpResponse].GetResult () [0x00000] in :0 \n at OneDrive.ODConnection+d__4e.MoveNext () [0x001f8] in e:\Work\onedrive-explorer-win-master\OneDriveSDK\ODConnection.cs:344 \n--- End of stack trace from previous location where exception was thrown ---\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in :0 \n at System.Runtime.CompilerServices.TaskAwaiter1[OneDrive.ODDataModel].GetResult () [0x00000] in <filename unknown>:0 \n at OneDrive.LargeFileUploader+<ExecuteUploadFragment>d__a.MoveNext () [0x00090] in e:\\Work\\onedrive-explorer-win-master\\OneDriveSDK\\LargeFileUploader.cs:81 \n--- End of stack trace from previous location where exception was thrown ---\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0 \n at System.Runtime.CompilerServices.TaskAwaiter1[OneDrive.ODDataModel].GetResult () [0x00000] in :0 \n at OneDrive.LargeFileUploader+d__0.MoveNext () [0x00151] in e:\Work\onedrive-explorer-win-master\OneDriveSDK\LargeFileUploader.cs:49 \n--- End of stack trace from previous location where exception was thrown ---\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in :0 \n at System.Runtime.CompilerServices.TaskAwaiter1[OneDrive.ODItem].GetResult () [0x00000] in <filename unknown>:0 \n at OneDrive.ODConnection+<StartLargeFileTransfer>d__45.MoveNext () [0x00164] in e:\\Work\\onedrive-explorer-win-master\\OneDriveSDK\\ODConnection.cs:328 \n--- End of stack trace from previous location where exception was thrown ---\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0 \n at System.Runtime.CompilerServices.TaskAwaiter1[OneDrive.ODItem].GetResult () [0x00000] in :0 \n at OneDrive.ODConnection+d__8a.MoveNext () [0x00095] in e:\Work\onedrive-explorer-win-master\OneDriveSDK\ODConnection.public.cs:218 \n--- End of stack trace from previous location where exception was thrown ---\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in :0 \n at System.Runtime.CompilerServices.TaskAwaiter`1[OneDrive.ODItem].GetResult () [0x00000] in :0 \n at Reeson.TimedService+d__b.MoveNext () [0x00844] in c:\Users\Craggs\Desktop\Reeson2\Reeson2\Reeson\TimedService.cs:338 "

NameConflictBehavior Fail not working

I'm trying to Fail when a name conflict occurs, but it's not working - I can run this code as many times as I like and never get an error...

                using (FileStream fs = new FileStream("food.txt", FileMode.Open, FileAccess.Read, FileShare.Read))
                {
                    ODItemReference od = new ODItemReference() { Path = "/drive/root:" };

                    ODItem rf = await cn.PutNewFileToParentItemAsync(od, "food.txt", fs, 
                        new ItemUploadOptions() { NameConflict = NameConflictBehavior.Fail });

                    ODItem rf3 = await cn.UploadLargeFileAsync(new ODItemReference() { Path = od.Path + "/food.txt" }, fs,
                        new ItemUploadOptions() { NameConflict = NameConflictBehavior.Fail });

                }

How to compile and run

Hello, sorry for opening a issue, could not find another way to contact you.

How do I compile the sample, Visual Studio states:
1>C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(2718,5): error MSB3323: Unable to find manifest signing certificate in the certificate store.

VS 2013

The project doesn't open in Visual Studio 2013 (which is why I was asking for it to be on nugget)

ItemUploadOptions not honored

When uploading a file and specifing the option to Fail on a name conflict this setting seems to be ignored. The already existing file is silently overwritten.

var opt = new ItemUploadOptions() { NameConflict = NameConflictBehavior.Fail };
var result = await Connection.PutNewFileToParentItemAsync(folder.ItemReference(), "upload2", fStr, opt);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.