-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2.0.0 - File uploads using htmx.ajax no longer uploads a file #2630
Comments
can you post the code you are using? |
What's the best way to provide this to you? It's part of a fairly large project, but this is the specific file which initiates the upload: https://github.com/kn6plv/aredn/blob/ucode-http/files/app/main/status/e/packages.ut |
OK, so you are including an element in a form w/ a file input? If you could boil it down to the HTML and the javascript, stripping out the accidental stuff, that would be great. I'll try it locally too. |
I've tried to extract the pertinent part of the code below (this is obviously not a runnable sample). There's a input file tag and a button which, when pressed, triggers the htmx.ajax to upload the file. This works fine with 1.X. With 2.X the encoding is correct and the payload arrives on the server and is decoded as I'd expect; except the packagefile.ipk just appears to be an empty object rather than the file data.
|
Taking a quick look at the ajax differences between 1.X and 2.0, I see that you're using a method called |
I think that this is also related to this issue: #2616 for now the API works with |
Was previously uploading a file using htmx.ajax by passing a File object as a value. Worked great in 1.X, but switching to 2.0 and now all I get uploaded is an empty object.
The text was updated successfully, but these errors were encountered: