Bug 19128 - need to support multi files upload.
Summary: need to support multi files upload.
Status: RESOLVED FIXED
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: HTTP (show other bugs)
Version: Nightly (Please specify date)
Hardware: Other other
: P1 enhancement with 8 votes (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
: 34912 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-04-17 21:05 UTC by Quande Ren
Modified: 2008-05-07 19:17 UTC (History)
2 users (show)



Attachments
patch to make file entry panel smilar with http arguments panel to allow multiple file upload (230.42 KB, patch)
2008-04-17 16:30 UTC, erhan kesken
Details | Diff
updated previous patch (233.01 KB, patch)
2008-05-03 11:11 UTC, erhan kesken
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Quande Ren 2003-04-17 21:05:52 UTC
the current version only support one upload file for one http request. this is 
not sufficient as sometime the web pages need more than one upload file.
Comment 1 Quande Ren 2003-07-31 13:59:31 UTC
I need this function very urgent. I really hope this can be implemented.
Comment 2 Mike Stover 2003-08-03 17:35:04 UTC
This is an enhancement, urgent or no.  
Comment 3 Jonathan Oliver 2005-07-05 00:49:45 UTC
(In reply to comment #0)
> the current version only support one upload file for one http request. this 
is 
> not sufficient as sometime the web pages need more than one upload file.


Has any progress been made on this enhancement yet?  I'm in serious need to 
utilize multiple file uploading and am unable to do so :(
Comment 4 Ronald van de Kuil 2006-06-04 15:39:22 UTC
Bug 34912 seems to be a duplicate
Comment 5 Sebb 2006-06-04 16:47:41 UTC
*** Bug 34912 has been marked as a duplicate of this bug. ***
Comment 6 Ludovico Caldara 2007-04-18 23:21:54 UTC
no news for this enhancement? jmeter is very powerful for some features. how can
it lack something like multiple file upload?
Comment 7 Alf Hogemark 2007-04-22 08:31:49 UTC
(In reply to comment #6)
> no news for this enhancement? jmeter is very powerful for some features. how can
> it lack something like multiple file upload?

In order to achieve support for multi file upload, I think the GUI for the HTTP
Request has to be restructured quite a bit, to have room for a table with three
columns (filename, file field name, mimetype) per row (i.e. file being uploaded).
I made bug 41917 for such a restructure. However, it is quite complicated to
restructure the GUI.

Once the GUI is in place, it would only take a few hours to add support for
multi file upload in other parts of JMeter.
Comment 8 Michelle Kinsey Bruns 2007-06-14 09:56:04 UTC
Consider mine another voice in support of this important feature. Thx, m
Comment 9 erhan kesken 2008-04-17 16:30:33 UTC
Created attachment 21828 [details]
patch to make file entry panel smilar with http arguments panel to allow multiple file upload

i tried to test as much as I can after development, also i added and updated many unit tests to be sure everything is all right.

my changelog is so:

	* src/protocol/http/org/apache/jmeter/protocol/http/sampler/PostWriter.java,
	src/protocol/http/org/apache/jmeter/protocol/http/sampler/PutWriter.java,
	src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampler2.java,
	src/protocol/http/org/apache/jmeter/protocol/http/proxy/HttpRequestHdr.java,
	src/protocol/http/org/apache/jmeter/protocol/http/sampler/AjpSampler.java:
	updated sampler classes for new multiple file upload structure.
	* src/protocol/http/org/apache/jmeter/protocol/http/proxy/HttpRequestHdr.java:
	src/protocol/http/org/apache/jmeter/protocol/http/config/gui/MultipartUrlConfigGui.java:
	made previously saved test plans compatible with new jmeter
	version with multiple file upload support.
	* src/protocol/http/org/apache/jmeter/protocol/http/config/MultipartUrlConfig.java:
	added files field and related methods.
	* src/core/org/apache/jmeter/util/JMeterVersion.java: updated
	version string.
	* src/core/org/apache/jmeter/resources/messages.properties,
	src/core/org/apache/jmeter/resources/messages_tr.properties: small
	label changes for new interface, and their turkish translation.
	* src/protocol/http/org/apache/jmeter/protocol/http/gui/HTTPFilesPanel.java,
	src/core/org/apache/jmeter/config/gui/FilesPanel.java,
	src/core/org/apache/jmeter/config/Files.java,
	src/core/org/apache/jmeter/config/File.java: copied http argument
	structure to multiple file upload structure via these new classes.
	* bin/testfiles/AssertionTestPlan.jmx,
	bin/testfiles/AuthManagerTestPlan.jmx, bin/testfiles/GuiTest.jmx,
	bin/testfiles/HeaderManagerTestPlan.jmx,
	bin/testfiles/InterleaveTestPlan.jmx,
	bin/testfiles/InterleaveTestPlan2.jmx,
	bin/testfiles/LoopTestPlan.jmx, bin/testfiles/Modification
	Manager.jmx, bin/testfiles/OnceOnlyTestPlan.jmx,
	bin/testfiles/SimpleTestPlan.jmx: updated testfiles with new saves
	of current version.
	* bin/saveservice.properties: added new classes to save service
	list.
	* build.xml: added test classes to classpath used for unittests (needed for ant junit task)
	* test/src/org/apache/jmeter/config/TestFile.java,
	test/src/org/apache/jmeter/config/TestFiles.java,
	test/src/org/apache/jmeter/config/gui/TestFilesPanel.java,
	test/src/org/apache/jmeter/protocol/http/config/MultipartUrlConfigTest.java,
	test/src/org/apache/jmeter/protocol/http/gui,
	test/src/org/apache/jmeter/protocol/http/gui/TestHTTPFilesPanel.java,
	test/src/org/apache/jmeter/protocol/http/proxy/TestHttpRequestHdr.java,
	test/src/org/apache/jmeter/protocol/http/sampler/HTTPNullSampler.java,
	test/src/org/apache/jmeter/protocol/http/sampler/NullURLConnection.java,
	test/src/org/apache/jmeter/protocol/http/sampler/PostWriterTest.java,
	test/src/org/apache/jmeter/protocol/http/sampler/PutWriterTest.java,
	test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplers.java,
	test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplersAgainstHttpMirrorServer.java,
	test/src/org/apache/jmeter/protocol/http/util/TestHTTPFile.java:
	added new unit tests and related mock objects, updated old tests
	for changes.
Comment 10 Bill 2008-04-22 12:32:19 UTC
I'm also in need of this function. How close are we to supporting multi-file upload? Thanks.
Comment 11 erhan kesken 2008-05-03 11:11:29 UTC
Created attachment 21914 [details]
updated previous patch

this update contains following TODOs

[ ] merge File and HTTPFile classes under the name "HTTPFileArg"
[ ] rename HTTPFiles class as HTTPFileArgs, and HTTPFilesPanel as HTTPFileArgsPanel
[ ] put removed public methods back in appropriate to single file scenerios (add warning logs for multiple file cases).
[ ] place a 'browse' button near add button to change selected row's path field, 'add' button will add empty rows
[ ] make it possible to use variables in file row fields.
[ ] make it possible to create backward compatible test plans for single file scenerios.
Comment 12 Sebb 2008-05-07 19:17:11 UTC
Thanks very much.

The patch has been applied (with a few tweaks) to SVN:

URL: http://svn.apache.org/viewvc?rev=654389&view=rev
Log:
Bug 19128 - Added multiple file POST support to HTTP Samplers
Comment 13 The ASF infrastructure team 2022-09-24 20:37:30 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/1079