-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Upload empty file #10113
Comments
Interesting. Maybe we can make that configurable. For the multipartform body parser and globally via application.conf. |
we use Java. It would be great if we can configure it. Thank you for the fast reply. |
@mkurz The same problem. When can I wait for the ability to download empty files to return? |
I am very busy right now with other things, however maybe I can have a look in the next couple of days. |
Thanks! It would be great! |
Hello @mkurz ! Is there any progress on this issue? |
@JoeSilentJoe Not yet, sorry. Even if I would fix this today, a new Play release will take a while anyway I guess. I put it onto my TODO list, hopefully the next days. |
@ksv510 When you say empty category/empty file, do you mean you upload a file without body but with a filename? Or is the filename also non-existent? Can you post how the request (headers) looks like? |
@ksv510 @JoeSilentJoe Here is the fix: #10236
in However, because of compatibility reasons that config can't be backported to 2.8.x and 2.7.x. But what I did is in #10237 and #10238 I backported the needed coded so you will be able to write your own body parsers that allow empty file uploads. This will work once Play 2.8.2 and 2.7.5 is released (again, for Play 2.9.0 this won't be necessary, the config will be enough then) |
Probably we can't backport to Play 2.7 because of problems its Scala 2.11 support is causing, see #10238 (comment) |
Upload a file without body but with a filename |
We have found the following PR https://github.com/playframework/playframework/pull/8882/files#diff-20801290d88b7f6470285127f95c3f0dR559
Why do you think that there is no sense to upload an empty file?
For example, I have implemented TODO list based on files. And file name is something like category. In this case, I cannot create empty category.
I know that this example is far-fetched. But all file systems allow creating empty file, so I believe you should too.
Currently, we need to upload empty files and we will make some hack to do it (((
The text was updated successfully, but these errors were encountered: