Re: [commons-fileupload2-jakarta-servlet6] - 2.0.0.M2 -DiskItemFile setPath

2024-07-07 Thread Gary Gregory
ItemFactory.builder().setPath(path).setBufferSize(DEFAULT_THRESHOLD).get(); > > > > > Sent: Saturday, July 06, 2024 at 2:31 PM > From: "Gary Gregory" > To: "Commons Developers List" > Subject: Re: [commons

Re: [commons-fileupload2-jakarta-servlet6] - 2.0.0.M2 -DiskItemFile setPath

2024-07-06 Thread sendi Tho
();   Sent: Saturday, July 06, 2024 at 2:31 PM From: "Gary Gregory" To: "Commons Developers List" Subject: Re: [commons-fileupload2-jakarta-servlet6] - 2.0.0.M2 -DiskItemFile setPath Those two methods are public. What am I missing? Gary On Sat, Jul 6, 2024, 11:09

Re: [commons-fileupload2-jakarta-servlet6] - 2.0.0.M2 -DiskItemFile setPath

2024-07-06 Thread Gary Gregory
commons-fileupload/commons-fileupload2-core/src/main/java/org/apache/commons/fileupload2/core/DiskFileItemFactory.java > > > TIA. > > > > > > Sent: Friday, July 05, 2024 at 11:31 PM > From: "sendi Tho" > To: dev@commons.apache.org > Cc: "Commons Deve

Re: [commons-fileupload2-jakarta-servlet6] - 2.0.0.M2 -DiskItemFile setPath

2024-07-06 Thread sendi Tho
, 2024 at 11:31 PM From: "sendi Tho" To: dev@commons.apache.org Cc: "Commons Developers List" Subject: Re: [commons-fileupload2-jakarta-servlet6] - 2.0.0.M2 -DiskItemFile setPath hi, thank you for reviewing this. I am just trying to set the path for temporaty file location f

Re: [commons-fileupload2-jakarta-servlet6] - 2.0.0.M2 -DiskItemFile setPath

2024-07-05 Thread sendi Tho
setSizeMax(MEMORY_THRESHOLD); upload.setSizeMax(MEMORY_THRESHOLD); upload.setPath(path);// not there eiter     Sent: Friday, July 05, 2024 at 9:04 PM From: "Gary Gregory" To: "Commons Developers List" Subject: Re: [commons-fileupload2-jakarta-servlet6] - 2.0.0.M2 -DiskItemF

Re: [commons-fileupload2-jakarta-servlet6] - 2.0.0.M2 -DiskItemFile setPath

2024-07-05 Thread Gary Gregory
Hello, Could you point out precisely in code what you are wanting to do with DiskFileFactory? Gary On Fri, Jul 5, 2024 at 8:18 AM sendi Tho wrote: > > Greetings guys, > > > I am trying to use the new "commons-fileupload2-jakarta-servlet6" > >org.apache.commons >

Re: commons-fileupload2-jakarta

2023-07-17 Thread Romain Manni-Bucau
Le lun. 17 juil. 2023 à 08:19, Martin Tzvetanov Grigorov < mgrigo...@apache.org> a écrit : > > > On 2023/07/15 14:04:54 Emmanuel Bourg wrote: > > On 12/07/2023 13:27, Martin Tzvetanov Grigorov wrote: > > > > > Last time when I tried to replace Commons Fileupload with pure Servlet > API I faced

Re: commons-fileupload2-jakarta

2023-07-17 Thread Martin Tzvetanov Grigorov
On 2023/07/15 14:04:54 Emmanuel Bourg wrote: > On 12/07/2023 13:27, Martin Tzvetanov Grigorov wrote: > > > Last time when I tried to replace Commons Fileupload with pure Servlet API > > I faced these issues: > > > > 1) The Servlet API does not provide hooks to follow the upload progress > >

Re: commons-fileupload2-jakarta

2023-07-15 Thread Emmanuel Bourg
On 11/07/2023 12:57, Eugene Grybinnyk wrote: We tried to get rid of commons-fileupload in favour of Servlet API for our project where we disable multipart and use streaming (not to store files on the disk). And it looks like Servlet API doesn’t provide a convenient way of streaming the

Re: commons-fileupload2-jakarta

2023-07-15 Thread Emmanuel Bourg
On 12/07/2023 13:27, Martin Tzvetanov Grigorov wrote: Last time when I tried to replace Commons Fileupload with pure Servlet API I faced these issues: 1) The Servlet API does not provide hooks to follow the upload progress To display a progress bar on the client side? 2) The Servlet API

Re: commons-fileupload2-jakarta

2023-07-12 Thread Martin Tzvetanov Grigorov
Hi, On 2023/07/09 14:45:21 Emmanuel Bourg wrote: > Dumb question: what's the benefit of using commons-fileupload in 2023 > instead of the equivalent file upload feature of the Servlet API? Last time when I tried to replace Commons Fileupload with pure Servlet API I faced these issues: 1) The

Re: Re: commons-fileupload2-jakarta

2023-07-11 Thread Gary Gregory
FYI, I plan on pushing a 2.0.0-M1 this week. Gary On Tue, Jul 11, 2023 at 8:48 AM Romain Manni-Bucau wrote: > > Sounds good to me, so something like v2 will target legacy apps migrating > to jakarta but there will be no v3 so prefer migrating to servlet API - or > your env API. > > Romain

Re: Re: commons-fileupload2-jakarta

2023-07-11 Thread Romain Manni-Bucau
Sounds good to me, so something like v2 will target legacy apps migrating to jakarta but there will be no v3 so prefer migrating to servlet API - or your env API. Romain Manni-Bucau @rmannibucau | Blog | Old Blog

Re: Re: commons-fileupload2-jakarta

2023-07-11 Thread Dennis Kieselhorst
> Not sure I get the why, let me summarize: > > * using [fileupload] in a servlet >= 3 container is conflicting and can > easily mess up things > * servlet provides [fileupload] api > * jetty (since you mentionned it) does not use [fileupload] ( >

Re: Re: commons-fileupload2-jakarta

2023-07-11 Thread Romain Manni-Bucau
Le mar. 11 juil. 2023 à 14:13, Maxim Solodovnik a écrit : > from mobile (sorry for typos ;) > > > On Tue, Jul 11, 2023, 18:58 Romain Manni-Bucau > wrote: > > > @Maxim: exactly, this is why hosting it only in tomcat and using the > > servlet abstraction is saner since commons is not usable in

Re: Re: commons-fileupload2-jakarta

2023-07-11 Thread Maxim Solodovnik
from mobile (sorry for typos ;) On Tue, Jul 11, 2023, 18:58 Romain Manni-Bucau wrote: > @Maxim: exactly, this is why hosting it only in tomcat and using the > servlet abstraction is saner since commons is not usable in tomcat without > relocation or hacks nobdoy wants on any sides and it is

Re: commons-fileupload2-jakarta

2023-07-11 Thread Romain Manni-Bucau
Le mar. 11 juil. 2023 à 14:09, Eugene Grybinnyk a écrit : > AFAIK it is NOT possible to have a lazy list populated on demand, because > we cannot know the number of attachments in the HTTP body till we parse the > body. The iterator (FileItemIterator) is the only working approach - you > ask for

Re: commons-fileupload2-jakarta

2023-07-11 Thread Eugene Grybinnyk
AFAIK it is NOT possible to have a lazy list populated on demand, because we cannot know the number of attachments in the HTTP body till we parse the body. The iterator (FileItemIterator) is the only working approach - you ask for the next attachment and you parse input stream further till you

Re: Re: commons-fileupload2-jakarta

2023-07-11 Thread Romain Manni-Bucau
@Maxim: exactly, this is why hosting it only in tomcat and using the servlet abstraction is saner since commons is not usable in tomcat without relocation or hacks nobdoy wants on any sides and it is the main relevant consumer these days. Romain Manni-Bucau @rmannibucau

Re: Re: commons-fileupload2-jakarta

2023-07-11 Thread Maxim Solodovnik
Tomcat uses the code copy\pasted from commons-fileupload (due to there was not release) IMO it is better to use library instead of copy/pasting here and there . On Tue, 11 Jul 2023 at 18:03, Romain Manni-Bucau wrote: > > This is a good point but guess it is not hard - and would be great - to

Re: Re: commons-fileupload2-jakarta

2023-07-11 Thread Romain Manni-Bucau
This is a good point but guess it is not hard - and would be great - to fix it in tomcat, just needs to not use ArrayList but a lazy list which will behave like fileupload streaming API. Under the hood the API already uses the FileItemIterator , it just needs to be able to populate the list

RE: Re: commons-fileupload2-jakarta

2023-07-11 Thread Eugene Grybinnyk
We tried to get rid of commons-fileupload in favour of Servlet API for our project where we disable multipart and use streaming (not to store files on the disk). And it looks like Servlet API doesn’t provide a convenient way of streaming the attachments (like commons-fileupload does) so in the

Re: commons-fileupload2-jakarta

2023-07-10 Thread Romain Manni-Bucau
Le lun. 10 juil. 2023 à 11:49, Gary Gregory a écrit : > As we all (should) know, there is no way to tell how a much a jar file is > used, beyond what Maven Central tells us, especially once within a > company's network that use it's own repository like Artifactory... > (not sure I get your

Re: commons-fileupload2-jakarta

2023-07-10 Thread Gary Gregory
As we all (should) know, there is no way to tell how a much a jar file is used, beyond what Maven Central tells us, especially once within a company's network that use it's own repository like Artifactory... Gary On Mon, Jul 10, 2023, 02:26 Romain Manni-Bucau wrote: > @Dennis: good question

Re: commons-fileupload2-jakarta

2023-07-10 Thread Romain Manni-Bucau
@Dennis: good question but how many servers do reuse commons? I know most of them reimplemented it (to own it or cause they dont use servlet or want a reactive based API) or reused tomcat forked (payara for ex or other tomcat based servers). So at the end I think the question is not "why" which is

Re: commons-fileupload2-jakarta

2023-07-09 Thread Dennis Kieselhorst
Hmm why should every server create it's own impl instead of sharing capabilities like multipart handling and parsing as a common library? I agree with the consumer part but the lib is still useful in the future to handle server side of things Dennis

Re: commons-fileupload2-jakarta

2023-07-09 Thread Emmanuel Bourg
On 09/07/2023 18:01, Gary Gregory wrote: I think it might be helpful to think about this in terms of existing and legacy code bases that need to migrate to the Jakarta namespace in a simple manner, as opposed to green-field development. Here the sensible migration path is to switch to the

Re: commons-fileupload2-jakarta

2023-07-09 Thread Romain Manni-Bucau
@Dennis: the point is more about not encouraging users to consume it, tomcat has no big issue integrating the project as it is in its own code base but as an servlet API user, importing it means either to not use servlet 3 api or to not use fileupload but both together can become a nightmare when

Re: commons-fileupload2-jakarta

2023-07-09 Thread Dennis Kieselhorst
It's not redundant as Servlet API is just the API and commons-fileupload offers a server-side implementation that even Tomcat could use (forked code lives here https://github.com/apache/tomcat/tree/main/java/org/apache/tomcat/util/http/fileupload). See also:

Re: commons-fileupload2-jakarta

2023-07-09 Thread Romain Manni-Bucau
Whereas I can envision the migration point but means putting an API on top of Servlet, not doing a v2 which is the v1 in a new namespace with conflict in the target env so if really a migration thing it should likely be marked as "to drop asap". For wicket, for example, I don't see them keeping it

Re: commons-fileupload2-jakarta

2023-07-09 Thread Gary Gregory
I think it might be helpful to think about this in terms of existing and legacy code bases that need to migrate to the Jakarta namespace in a simple manner, as opposed to green-field development. For example, Apache Wicket has a branch using FileUpload 2 snapshot. I plan on cutting a release

Re: commons-fileupload2-jakarta

2023-07-09 Thread Romain Manni-Bucau
Le dim. 9 juil. 2023 à 16:45, Emmanuel Bourg a écrit : > Dumb question: what's the benefit of using commons-fileupload in 2023 > instead of the equivalent file upload feature of the Servlet API? > +1, sounds redundant and can potentially break servlet API (or file upload one depending how it

Re: commons-fileupload2-jakarta

2023-07-09 Thread Emmanuel Bourg
Dumb question: what's the benefit of using commons-fileupload in 2023 instead of the equivalent file upload feature of the Servlet API? The use case I had in mind was to support file upload in very old Servlet containers still in production (Tomcat 6 or Jetty 7 for example, both EOL), but

Re: commons-fileupload2-jakarta

2023-07-07 Thread Gary Gregory
I plan on creating a 2.0.0-M1 release candidate this weekend or next week, so soonish. Gary On Fri, Jul 7, 2023, 14:40 Marinko wrote: > Hi > > Any plan about the release date of the commons-fileupload2-jakarta < >