upload file html

29 Nov '16, 11:27 AM
10,448 Views
No Forum Badges

Ciao,

vorrei eseguire l'upload di un file da una pagina della mia applicazione.

Stavo pensando di usare il tag input di html con l'attributo type="file" in modo che l'utente non debba scrivere il percorso del file che vuole caricare. Il problema è che non ho idea di come passare il nome e il path del file selezionato allo script groovy che provvederà a copiare il file in una cartella interna all'applicazione? E' possibile poi scrivere il file direttamente senza passare per il blob?

Grazie 

 

Hi, I want to upload a file (pdf, txt or other) by a page in an application folder.

I think to use the input type file of html (<input type="file" ... >) because I don't want that user writh the path of the chisen file... but the question is:

how can I pass any parameters to my groovy script? Can I write the file to upload without save it in a blob?

Thanks to all

 
x 0
Follow
Answer Answer at this question and get points!
Forum Hero - Level 9

Ciao Luigi,

per effettuare l'upload di file senza utilizzare un Attributo di tipo blob ti confermo che potrai modellare un Field di tipo Blob e creare il file su file system con una Script.

In questo caso ti suggerisco di far riferimento ai seguenti articoli:

https://my.webratio.com/learn/learningobject/using-the-script-component

https://my.webratio.com/learn/learningobject/Handling-BLOBs

e alle risposte fornite in questo topic:

https://www.webratio.com/forum/question-details/upload-file-and-the-move-it-to-other-location

   
x 1
Answer at this question and get points!

Related questions

Ajax and FCK Editor (WebRatio 5.x) Ajax onchange and jQuery 2.x (with migrate plugin) incompatible Ajax on change selection field and modify units Autocomplete template Automatic date in form Automatic file upload BPMN: URL field ckeditor - change directory for the browser Clean a form Como crear cambio de contraseƱa Como tener dos botones juntos en un formulario independientes de una accion? Como usar la funciĆ³n autocomplete en un field Compare with the current time coupled mandatory fields Cryptic error when submitting a form Disabilitare campi durante evento AJAX Drop down menu question Dudas sobre modelado(Data Flow,Forms y Operation Create) Dynamic attribute/field names. Possible? Dynamic instantiation of fields on a page for any Class type Empty record mistakenly saved entry form logic. Entry Unit - Default field timestamp Entry Unity, Field Date Type Error Field as link soruce Form element Form template Getting the absolute path of a RTXBLOBData Hide form until a flow is triggered Hiding form components based on page conditions Hierarchy component How I can receive the primary key value after adding into database from OK Port. How to redirect to the correct site view after a successful login attempt input mask Multi Entry Unit: How to forward only checked rows? Multi-Image Upload Multiple forms on one page. HTML5 input attributes. Possible? (2 questions) multi selections field problem Multi Selects didn't work in update page Prelevare la chiave del record da una Selection Field in una Multiple Form Problem saving multi selection from input Progress bar when uploading big file(s) in a form? Pulire URL Redirecting users to another site view Resize fields Search by Selector component does not work selection fields on cascade Select multiple files for upload Setting Upload directory Showing items that have a relation with an entity Slot in Selection Field Update fields based on selection of other fields Updating attributes of an entity upload file and the move it to other location Uppercase Uso de la componente chart de webRatio Validacion validation fields Value Length (Min) fails to validate when field is empty? WebRation - Create Navigation diagram What are the new features of WebRatio 6.1? which of these three models is closer to webratio/ifml way of creating web applications