forked from TrueCloudLab/rclone
b2: Fix upload of files large files not in root - fixes #582
This commit is contained in:
parent
c3e996f10f
commit
41917eb1f2
1 changed files with 2 additions and 2 deletions
|
@ -32,7 +32,7 @@ type largeUpload struct {
|
||||||
|
|
||||||
// newLargeUpload starts an upload of object o from in with metadata in src
|
// newLargeUpload starts an upload of object o from in with metadata in src
|
||||||
func (f *Fs) newLargeUpload(o *Object, in io.Reader, src fs.ObjectInfo) (up *largeUpload, err error) {
|
func (f *Fs) newLargeUpload(o *Object, in io.Reader, src fs.ObjectInfo) (up *largeUpload, err error) {
|
||||||
remote := src.Remote()
|
remote := o.remote
|
||||||
size := src.Size()
|
size := src.Size()
|
||||||
parts := size / int64(chunkSize)
|
parts := size / int64(chunkSize)
|
||||||
if size%int64(chunkSize) != 0 {
|
if size%int64(chunkSize) != 0 {
|
||||||
|
@ -52,7 +52,7 @@ func (f *Fs) newLargeUpload(o *Object, in io.Reader, src fs.ObjectInfo) (up *lar
|
||||||
}
|
}
|
||||||
var request = api.StartLargeFileRequest{
|
var request = api.StartLargeFileRequest{
|
||||||
BucketID: bucketID,
|
BucketID: bucketID,
|
||||||
Name: remote,
|
Name: o.fs.root + remote,
|
||||||
ContentType: fs.MimeType(src),
|
ContentType: fs.MimeType(src),
|
||||||
Info: map[string]string{
|
Info: map[string]string{
|
||||||
timeKey: timeString(modTime),
|
timeKey: timeString(modTime),
|
||||||
|
|
Loading…
Reference in a new issue