Skip to content

Commit bed2119

Browse files
author
allan
committed
fix: remove targetFolder parameter from Upload function and update related tests
1 parent 4acabfc commit bed2119

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

compress/api_upload.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ func (o *compress) SetPublishedUpload(jobid int, published int) (*VideoUploadInf
151151
* @param {string} filename
152152
* @param {string} targetFolder
153153
*/
154-
func (o *compress) Upload(file []byte, size int64, categoryId int, title string, tags string, location string, filename string, targetFolder string) (*ResponseUpload, error) {
154+
func (o *compress) Upload(file []byte, size int64, categoryId int, title string, tags string, location string, filename string) (*ResponseUpload, error) {
155155
//
156156
respCustomerS3, err := o.GetCustomerS3Zone()
157157
if err != nil {
@@ -162,7 +162,7 @@ func (o *compress) Upload(file []byte, size int64, categoryId int, title string,
162162
}
163163
zone := respCustomerS3.Data.Zone
164164
fmt.Println("zone ", zone)
165-
bucketFolderDestination := respCustomerS3.Data.BucketUpload + "/" + targetFolder + "/" + filename
165+
bucketFolderDestination := respCustomerS3.Data.BucketUpload + filename
166166
//o.debugPrint("bucketFolderDestination " + respCustomerS3.Data.BucketUpload)
167167
fmt.Println("bucketFolderDestination", bucketFolderDestination)
168168
//

compress/compress.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ type ICompress interface {
1616
GetSingleUpload(jobid int) (*VideoUploadInfo, error)
1717
GetJobidProgress(jobid int) (*VideoUploadInfo, error)
1818
SetPublishedUpload(jobid int, published int) (*VideoUploadInfo, error)
19-
Upload(file []byte, size int64, categoryId int, title string, tags string, location string, filename string, targetFolder string) (*ResponseUpload, error)
19+
Upload(file []byte, size int64, categoryId int, title string, tags string, location string, filename string) (*ResponseUpload, error)
2020
//UploadMultipart(reader io.Reader, size int64, categoryId int, title string, tags string, location string, filename string, targetFolder string) (*ResponseUpload, error) // need to add this feature
2121
GetCategories() ([]Category, error)
2222
CreateCategory(name string) (*Category, error)

test/api_upload_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ func TestUpload(t *testing.T) {
3737
"tag",
3838
"",
3939
"title.mp4",
40-
"",
4140
)
4241
//fmt.Print(response)
4342

0 commit comments

Comments
 (0)