Closed GoogleCodeExporter closed 9 years ago
Original comment by johan.ha...@gmail.com
on 21 Mar 2015 at 5:39
Original comment by johan.ha...@gmail.com
on 21 Mar 2015 at 5:40
I've added support for this now I think. Please try it out by depending on
2.4.1-SNAPSHOT after having added the following repo:
<repositories>
<repository>
<id>sonatype</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<snapshots />
</repository>
</repositories>
Original comment by johan.ha...@gmail.com
on 21 Mar 2015 at 5:48
I haven't tested it with large files/inputstreams so I'm still not sure if it
works
Original comment by johan.ha...@gmail.com
on 21 Mar 2015 at 5:49
I've tried the code from the 2.4.1-SNAPSHOT but it didn't work using the code
listed below:
given().spec(adminBasicAuth).content(new FileInputStream(new File(testFile))).when().put("/" + test_container + "/" +testFile);
and
given().spec(adminBasicAuth).content(new File(testFile)).when().put("/" + test_container + "/" +testFile);
I tried several test files with sizes of 157 bytes and 4GB. Would you please
confirm that the form of these commands is correct?
Original comment by siwarsha...@gmail.com
on 23 Mar 2015 at 8:40
Thanks for trying it out. It actually works for small files in my tests. Please
have a look at
https://github.com/jayway/rest-assured/blob/master/examples/rest-assured-itest-j
ava/src/test/java/com/jayway/restassured/itest/java/NonMultiPartUploadITest.java
. The actual services that handles the "file" request is a simple Scalatra
resource that is defined like this (same for post and put):
post("/file") {
val content: String = IOUtils.toString(request.getInputStream)
content
}
Original comment by johan.ha...@gmail.com
on 24 Mar 2015 at 10:44
Also, what error do you get?
Original comment by johan.ha...@gmail.com
on 24 Mar 2015 at 10:44
That works for small files, now I need to get it working with the large files.
Running into heap space error when running Eclipse project when uploading 1G
file. Once I get that resolved I'll try 4G and 6G files.
Original comment by siwarsha...@gmail.com
on 24 Mar 2015 at 2:26
Hmm I wonder why that is. It shouldn't need to copy everything into memory.
Original comment by johan.ha...@gmail.com
on 24 Mar 2015 at 4:09
I found the source of the heap space error, it was in my code. After fixing it
I ran tests with 1Gb and 4Gb files -- no problems, it worked as advertised.
Thanks for your assistance, Johan.
Original comment by siwarsha...@gmail.com
on 24 Mar 2015 at 7:50
Great! Thanks for helping out and testing it.
Original comment by johan.ha...@gmail.com
on 24 Mar 2015 at 7:52
Original issue reported on code.google.com by
todd...@gmail.com
on 20 Mar 2015 at 7:13