Skip to content

Issue using blank file_type in :upload_file #59

@baserz

Description

@baserz

Hi!
It seems that sepafm do not accept empty file_types for the :upload_file operation.
Since DanskeBank utilizes blank file_type as a valid format we have a need to get this working.

Example of their formats below:

UMTL Global Transfer (SWIFT MT101). – only used in Finland
Must be blank EDIFACT 96 A format: PAYMUL
Must be blank EDIFACT 96A format: DIRDEB
Must be blank Danske Bank commaseparated format: Payment files
CMBO,CMUO,CMGB,CMBODK,CMSI,CMNI,CMFI,CMDE,CMGBDC,CMII,
CMUOGB,CMIIDC,CMUOIE,CMUO10,CMUOSE,CMUOFI,CMUODE,CMUONO
Must be blank Danske Bank commaseparated format: Collection files
COLLECTION,COLDEBMOD,COLDELETE

The error i receive when setting file_type: "" is "File type needs to be present and under 35 characters"

I did a check into your source and confirmed that in your code the following check is done:

def check_file_type
      if file_type.present?
        valid = file_type.size < 35
      else
        return if bank == :op && %i(download_file download_file_list).include?(command)

Tried inserting both "" and " " as file_type but i guess that it requires some form of content as it is built now? Do you have a workaround (Like som special notation if empty type) to get this working in current version? Or is this an issue that needs to be fixed? Thanks a lot in advance for your assistance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions