Git Product home page Git Product logo

Comments (20)

fjogeleit avatar fjogeleit commented on May 23, 2024 1

Okay, thanks.

from http-request-action.

fjogeleit avatar fjogeleit commented on May 23, 2024 1

No worries thanks for the update

from http-request-action.

fjogeleit avatar fjogeleit commented on May 23, 2024

hey, thanks for reporting. I will have a look when I find some time.

So the action in general is working when you use the /. So it is not blocking you?

from http-request-action.

hrueger avatar hrueger commented on May 23, 2024

Thanks for the quick response.

So the action in general is working when you use the /. So it is not blocking you?

Yes, exactly 👍

from http-request-action.

fjogeleit avatar fjogeleit commented on May 23, 2024

Hey, sorry for the late response,

If this is still relevant for you, I added a path.normalize to let node convert all file paths depending on the operating system. It would be cool if you could test if this solves your issue.

The change is currently available over the develop branch: fjogeleit/http-request-action@develop

from http-request-action.

hrueger avatar hrueger commented on May 23, 2024

Hey, no problem. Thanks for the work, I'll test that next week 👍

from http-request-action.

hrueger avatar hrueger commented on May 23, 2024

Hi, sorry for my very late response. We haven't made a release since, so I couldn't test it :-(
I let you know once we do a new release 👍

from http-request-action.

hrueger avatar hrueger commented on May 23, 2024

Hi @fjogeleit,
we just made a release and I tried the develop version. However, it is still not working:

Run fjogeleit/http-request-action@develop
  with:
    url: ***/release/_ingest/myApp/desktop
    method: POST
    username: ***
    password: ***
    files: { "file": "packages\release\myApp Setup 1.0.0.exe" }
    timeout: 120000
    data: {}
  env:
    NODE_OPTIONS: --max_old_space_size=8048
Error: {"code":400,"message":"No files were uploaded."}

Error Code 400 comes from my server.

After a bit more thinking, I don't think path.normalize has changed anything here, because this is running on a Windows machine, so it would probably just break the workaround (which was replacing \ with /).

Do you have any idea what is going wrong here?

from http-request-action.

fjogeleit avatar fjogeleit commented on May 23, 2024

hm yeah, looks like normalize doesn't help as expected. Strange that it converts the path in a way that the fs module can't handle it.

Maybe the easiest solution is to go with the forward slash and document it for other users. I don't really have an idea right now. The only think I found was that Windows uses \\ as separator. So maybe it works with the current stable version (without the normalize) and \\ instead of \ as separator.

from http-request-action.

hrueger avatar hrueger commented on May 23, 2024

Can't we just replace all \ with /? I don't believe that to have any side effects since you won't have them in file/folder names anyway.

from http-request-action.

fjogeleit avatar fjogeleit commented on May 23, 2024

Yeah sure, you can still go with that workaround. I will close the normalize PR and add this behavior to the documentation. Nothing more I can do, right now. If this is fine for you I will close the issue

from http-request-action.

hrueger avatar hrueger commented on May 23, 2024

I meant including that workaround in the action itself

from http-request-action.

hrueger avatar hrueger commented on May 23, 2024

But we can also keep it out of there, if you like.

from http-request-action.

fjogeleit avatar fjogeleit commented on May 23, 2024

Hm not sure if a simple replace could be problematic in some cases where escaped \ part of a path. Could be an edgecase but possible.

from http-request-action.

hrueger avatar hrueger commented on May 23, 2024

Hm, good point.

from http-request-action.

bgerhards-vermeer avatar bgerhards-vermeer commented on May 23, 2024

Do you want to add this as a feature? When looking at Windows paths, when you put them in a string, the requirement (because of backslash default behavior) is to character escape the path.

Example:
"path\\to\\folder"

Are there any other packages that exhibit the requested behavior? I know it makes for an easy copy/paste but once someone adds \ to their path I believe it can cause undesired behavior with double \ in the output path.

Good luck!

from http-request-action.

fjogeleit avatar fjogeleit commented on May 23, 2024

Hey, what kind of feature do you mean? Replacing \ with / ?

from http-request-action.

bgerhards-vermeer avatar bgerhards-vermeer commented on May 23, 2024

Yes

from http-request-action.

fjogeleit avatar fjogeleit commented on May 23, 2024

I may have a look on it and see if I can provide something

from http-request-action.

fjogeleit avatar fjogeleit commented on May 23, 2024

I did some test and overall it's not possible provide a working solution for it.

It turns out that backslashes in input values are not automatically escaped in strings, so I am also not in the situation to convert them, because I can not filter/target them with an regex. The user must escape the paths themself or directly replace them with forward slashes.

from http-request-action.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.