https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40811

            Bug ID: 40811
           Summary: Enhance Koha::File::Transport API
 Change sponsored?: ---
           Product: Koha
           Version: Main
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: Architecture, internals, and plumbing
          Assignee: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]

Looking at bug 38115, it feels like the code that is required to use a
transport is too protocol dependent.

The current sequence is:

1) Initialize the transport (->find)
2) Attempt to connect
3) Retrieve the configured base path ($file_server->upload_diectory)
4) Manually set the working dir for uploading $file_server->change_directory)
5) Upload the file

I believe we should (keeping only this FTP/SFTP use case in mind) simplify to:

1) Initialize (->find)
2) Upload the file with an optional path parameter

Step (2) would attempt to connect if the connection is not active, set the path
to the passed path or internally pick the default and use it. Any failed step
should raise a specific exception.

This schema could work for other protocols like S3, etc.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to