Skip to content
This repository has been archived by the owner on Jan 19, 2021. It is now read-only.

Add-PNPFile fails on uploading files larger than 250 MB #936

Open
4 tasks
ShanesCows opened this issue Jul 18, 2017 · 11 comments
Open
4 tasks

Add-PNPFile fails on uploading files larger than 250 MB #936

ShanesCows opened this issue Jul 18, 2017 · 11 comments

Comments

@ShanesCows
Copy link

###Notice: many issues / bugs reported are actually related to the PnP Core Library which is used behind the scenes. Consider carefully where to report an issue:###

  1. Is the issue related to the cmdlet itself, its parameters, the syntax, or do you suspect it is the code of the cmdlet that is causing the issue? Then please continue reporting the issue in this repo.

The issue may be underlying libraries but I am not a developer so I am not helpful in determining that.

Reporting an Issue or Missing Feature

When I try to add-pnpfile for a file larger than 250 MB I get the following error:

Add-PnPFile : The request message is too big. The server does not allow messages larger than 262144000 bytes.

Expected behavior

SPO supports much larger file sizes so I would like to be able to upload to the SPO max file size.

Actual behavior

image

Steps to reproduce behavior

Add-PnPFile -Path .\camtasia.txt -Folder fileshare

Which version of the PnP-PowerShell Cmdlets are you using?

  • PnP PowerShell for SharePoint 2013
  • PnP PowerShell for SharePoint 2016
  • [X ] PnP PowerShell for SharePoint Online

What is the version of the Cmdlet module you are running?

2.16.1706.1

How did you install the PnP-PowerShell Cmdlets?

  • MSI Installed downloaded from GitHub
  • [X ] Installed through the PowerShell Gallery with Install-Module
  • Other means
@victory-tb
Copy link

I do try with a file ~ 300MB, though it does not throw exact error message like you have, I am not able to upload it too ... Simply "Add-PnPFile : The remote server returned an error: (404) Not Found."

@mrik23
Copy link

mrik23 commented Jul 22, 2017

I think that has always been like this with PnP PowerShell. I have some scripts that allowed me to upload files up to 2GB, but I don't remember exactly what made the difference beside changing the http session timeout.

@victory-tb
Copy link

victory-tb commented Jul 28, 2017

For files a bit over 250MB, error:
"_Add-PnPFile : The request message is too big. The server does not allow messages larger than 262144000 bytes.
At line:27 char:1

  • Add-PnPFile -Path $FullName -Folder $fn -Values @{Modified=$Mod. ...
  •   + CategoryInfo          : WriteError: (:) [Add-PnPFile], ServerException
      + FullyQualifiedErrorId : EXCEPTION,SharePointPnP.PowerShell.Commands.Files.AddFile_"
    
    

For files as large as 600MB-1GB, error:
"_Add-PnPFile : The underlying connection was closed: An unexpected error occurred on a send.
At line:27 char:1

  • Add-PnPFile -Path $FullName -Folder $fn -Values @{Modified=$Mod. ...
  •   + CategoryInfo          : WriteError: (:) [Add-PnPFile], WebException
      + FullyQualifiedErrorId : EXCEPTION,SharePointPnP.PowerShell.Commands.Files.AddFile_"
    
    

Or:
"_Add-PnPFile : The remote server returned an error: (404) Not Found.
At line:27 char:1

  • Add-PnPFile -Path $FullName -Folder $fn -Values @{Modified=$Mod. ...
  •   + CategoryInfo          : WriteError: (:) [Add-PnPFile], WebException
      + FullyQualifiedErrorId : EXCEPTION,SharePointPnP.PowerShell.Commands.Files.AddFile_"
    

@Brentless
Copy link

Did this ever go anywhere or anyone ever find a workaround using PnP? I've just run into this same issue (have a file that is ~260MB that I need to upload and getting the same error)

@pauliev
Copy link

pauliev commented Feb 20, 2018

I am also running into the same issue... would love this to be resolved!

@victory-tb
Copy link

At that time I end up uploading all files except large files and using another tool to scan & re-upload missing files [large files].

@pauliev
Copy link

pauliev commented Feb 23, 2018

@victory-tb What tool to you use for scanning and re-uploading large files?

@victory-tb
Copy link

The free tool is "Fiechter.OneDriveBackup".

@sivailangos
Copy link

Is there any workaround for it?

@rusticles
Copy link

Has there been any changes to allow for larger files?

@Lucho1970
Copy link

Still not working. This was supposed to be a fix for the 250MB list item attachment limit. I am copying the files to a doc library instead and this doesn't work either. Makes no sense.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants