Skip to content

Uploaded files have duplicated extension like .jpgjpg #24

@edgarss

Description

@edgarss

after tus/TUSKit#95 was merged into TUSKit it introduced a bug where files uploaded with transloadit have duplicated filename extensions like filename.jpgjpg

To fix this in Assembly.swift you have to replace withPathURL.lastPathComponent with withPathURL.deletingPathExtension().lastPathComponent since TUSUpload expects the id to be without extension and the extension is supplied separately.

public func addFile(withPathURL: URL) {
        tusUpload = TUSUpload(withId: withPathURL.deletingPathExtension().lastPathComponent, andFilePathURL: withPathURL, andFileType: withPathURL.pathExtension)
    }

Metadata

Metadata

Assignees

Labels

sdksIntegrations for Transloadit's API

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions