http: immediately fail streaming uploads instead of spooling them first (see #1614)
This commit is contained in:
parent
e754f50778
commit
323daae63e
1 changed files with 9 additions and 3 deletions
|
@ -356,6 +356,11 @@ func (f *Fs) Put(in io.Reader, src fs.ObjectInfo, options ...fs.OpenOption) (fs.
|
||||||
return nil, errorReadOnly
|
return nil, errorReadOnly
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// PutStream uploads to the remote path with the modTime given of indeterminate size
|
||||||
|
func (f *Fs) PutStream(in io.Reader, src fs.ObjectInfo, options ...fs.OpenOption) (fs.Object, error) {
|
||||||
|
return nil, errorReadOnly
|
||||||
|
}
|
||||||
|
|
||||||
// Fs is the filesystem this remote http file object is located within
|
// Fs is the filesystem this remote http file object is located within
|
||||||
func (o *Object) Fs() fs.Info {
|
func (o *Object) Fs() fs.Info {
|
||||||
return o.fs
|
return o.fs
|
||||||
|
@ -479,6 +484,7 @@ func (o *Object) MimeType() string {
|
||||||
// Check the interfaces are satisfied
|
// Check the interfaces are satisfied
|
||||||
var (
|
var (
|
||||||
_ fs.Fs = &Fs{}
|
_ fs.Fs = &Fs{}
|
||||||
|
_ fs.PutStreamer = &Fs{}
|
||||||
_ fs.Object = &Object{}
|
_ fs.Object = &Object{}
|
||||||
_ fs.MimeTyper = &Object{}
|
_ fs.MimeTyper = &Object{}
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue