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

IFile FileSize (or Length) #422

Closed
1 task done
DaleyKD opened this issue May 4, 2021 · 4 comments
Closed
1 task done

IFile FileSize (or Length) #422

DaleyKD opened this issue May 4, 2021 · 4 comments
Labels
area: model 📐 Related to the core SDK models

Comments

@DaleyKD
Copy link
Contributor

DaleyKD commented May 4, 2021

Category

  • Domain model extension

Describe the domain model extension

In CSOM, Microsoft.SharePoint.Client.File has a property named Length.

Model

Model: IFile
Properties: Length (or FileSize/Size)

APIs

API: https://<tenant>.sharepoint.com/sites/<site>/_api/web/lists(guid'<listId>')/items(<listItemId>)/file (length property)
or
API: https://graph.microsoft.com/v1.0/sites/<siteId>/lists/<listId>/items/<itemId>/driveItem (size property)

Additional Information

Drive Item Microsoft Graph Documentation

@pkbullock pkbullock added the area: model 📐 Related to the core SDK models label May 5, 2021
@DaleyKD
Copy link
Contributor Author

DaleyKD commented May 7, 2021

I'm hoping to be able to submit a PR at some point, but I'm fighting being able to get the unit tests to work. I can't seem to Register-PnPManagementShellAccess. pnp/powershell#663

@jansenbe
Copy link
Contributor

jansenbe commented May 8, 2021

@DaleyKD : really appreciate you wanne help out :-) If you're in GCC then please follow what was mentioned in the other PS issue. Once you've the app setup you need to update the test configuration files to use it...that would then be something like this:

"Credentials": {
      "DefaultConfiguration": "MySetup",
      "Configurations": {
        "MySetup": {
          "CredentialManager": {
            "ClientId" : "<your app id>",
            "TenantId" : "<your tenant id>",
            "CredentialManagerName": "credman"
          }
        }
      }
    },

Alternatively you can also sign up for a free developer tenant via https://developer.microsoft.com/en-us/microsoft-365/dev-program and then you're tenant admin in a regular tenant, so the documented flow should work.

If in the end you're not able to get things working then please reach out, we can have a short meeting to get you unblocked.

@DaleyKD
Copy link
Contributor Author

DaleyKD commented May 12, 2021

Tried to fix this with #445

@jansenbe
Copy link
Contributor

Thanks a ton @DaleyKD , just merged your PR so closing this issue. Thanks for helping out the SharePoint community.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: model 📐 Related to the core SDK models
Projects
None yet
Development

No branches or pull requests

3 participants