Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Uploading a file from a HTML client to a server

Hi,
which is the best component to use to upload a file from a HTML / web browser client and to store it on the server for further processing by Talend? I am looking for the Talend equivalent to the usual PHP or CGI scripts, that process files sent by HTML file forms.
Many thanks in advance!
Markus
Labels (2)
8 Replies
Anonymous
Not applicable
Author

Hi,
If you want to upload file with Talend,  pleaswe try to use tFileFetch component ( POST + upload file ).
Feel free to let us know if it is OK with you.
Best regards
Sabrina
Anonymous
Not applicable
Author

Also, tRESTRequest can accept HTTP form uploads and the multipart attachments in general
Cheers, Sergey
Anonymous
Not applicable
Author

Many thanks! Can you help me with some details for the tRESTRequest option?
I managed to write a HTML form that successfully sent a POST to my tRESTRequest component.
How can I process the entire file to e.g. save it or import it into a database?
I built a job to save the file. It executed without error, even wrote a file, but it was empty rather than containing the content of the uploaded file. I managed to process individual strings withtRESTRequest, like shown in your documentation, but how to best deal with the entire uploaded file?
I use the following following HTML form:

<!DOCTYPE html>
<html>
<body>
<form action="http://localhost:8088/Test" method="post" enctype="multipart/form-data">
    Select image to upload:
    <input type="file" name="fileToUpload" id="fileToUpload">
    <input type="submit" value="Upload Image" name="submit">
</form>
</body>
</html>
This is how my tRESTRequest is configured in my job
0683p000009MDsx.png
Many thanks in advance!
_AnonymousUser
Specialist III
Specialist III

Myself strucked with same problem??
any help to solve this guys??
Anonymous
Not applicable
Author

Anonymous
Not applicable
Author

FileFetch works well for a Transaction to fetch files from another server, but (to my understanding) is not capable to let a user upload files to a Server via a web interface.  tRESTRequest should be the one to build a transaction for such a task (in combination with a HTML upload form), but I did not get it working.
I now use the free HFS http fileserver, that can be easily embedded in web pages, to have users uploading files from their local computer to my Talend Server and manage them there conveniently. The Talend transaction subsequently processes files located on the Talend server.
I would still appreciate a working tRestRequest & HTML form based file Transfer example, just in case someone gets it working.
Anonymous
Not applicable
Author

i need to do this with 'tRESTRequest ' ??
Team any help to accomplish this task using 'tRestRequest'??
This is my exact requirement so i am rushing.
Anonymous
Not applicable
Author

As far I know, the multipart requests (file uploads) are not supported by any DI (data integration) flow components, so you cannot just upload a file directly from the HTML page into the DI job. You have to store the file locally and then process it. However - you may still build a REST endpoint using the CXF framework and then invoke an integration route or any Talend job. See https://help.talend.com/search/all?query=Forms+and+multiparts&content-lang=en
g.