ipol-journal / ipolDevel

IPOL demo system development
GNU Affero General Public License v3.0
23 stars 3 forks source link

Why is the "ext" field of inputs in ddl always required? #169

Closed li-yanhao closed 1 year ago

li-yanhao commented 1 year ago

Hi!

I am writing a demo that allows several types of input formats. It seems the only solution is using the input type "data" in the ddl. But why is the input file always renamed with a required extension? Can't we just keep the original filename and use a variable like $input_0 to store it? The forced renaming is annoying because it also removes the original extension. It would be practical if my program can recognize the file type easily by the file extension, instead of using "file" command in bash or "magic" package in python.

mcolom commented 1 year ago

Hi Yanhao,

@hmaciasc @kidanger If I'm not wrong, I think now it's possible to obtain the original's file name of the input, isn't it? Could you confirm this?

li-yanhao commented 1 year ago

Hi Miguel,

I tested the new feature $orig_input_i and it does keep the original name of the file. But the file is still renamed by IPOL with the required extension. Would it be more reasonable not to rename the input files? But I know that will affect a lot of old demos and might have some other issues...

Best, Yanhao

On 11 Apr 2023, at 10:58, Miguel Colom @.***> wrote:

Hi Yanhao,

@hmaciasc https://github.com/hmaciasc @kidanger https://github.com/kidanger If I'm not wrong, I think now it's possible to obtain the original's file name of the input, isn't it? Could you confirm this?

— Reply to this email directly, view it on GitHub https://github.com/ipol-journal/ipolDevel/issues/169#issuecomment-1502942074, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKYBBBTHS2MNQTXGRQ56CNDXAUMKRANCNFSM6AAAAAAWZRYXFI. You are receiving this because you authored the thread.

mcolom commented 1 year ago

As you said, there are already demos relying on the current behavior. It's better not to change it. If you can find the original name in $orig_input_i, then you have all you need for your demo :)