Uploading files

MiServer is Dyalog's APL-based web development framework

Uploading files

Postby MBaas on Sat May 16, 2015 1:41 pm

Has anyone already been successful in finding out how to receive files uploaded with regular <input type="file">-controls?
User avatar
MBaas
 
Posts: 156
Joined: Thu Oct 16, 2008 1:17 am
Location: Gründau / Germany

Re: Uploading files

Postby MBaas on Wed May 27, 2015 8:07 am

Got it running with help from Morten and fixes from Brian.
      Get'name of field'
now returns an object with filename and data.
User avatar
MBaas
 
Posts: 156
Joined: Thu Oct 16, 2008 1:17 am
Location: Gründau / Germany

Re: Uploading files

Postby woody on Thu Mar 24, 2016 10:26 pm

Greetings.

We are running MiServer 2.2 and need a little help on how to upload files from the user's client browser ... into MiServer engine.

I have a standard Form with file upload in HTML... and it SEEMS that the upload is happening ... but ... where do I find the uploaded file name and image?

I see the file name and the blob data in the Req.Data variable. (See attached screen shot)

How do I process this data? Is it ready to be saved as a file.jpg ? or does it need to be translated first?

Thanks in advance!

//W

MServer-Upload.PNG
Woodley Butler
Automatonics, Inc.
"Find your head in the APL Cloud"
http://www.APLcloud.com
User avatar
woody
 
Posts: 144
Joined: Tue Dec 28, 2010 12:54 am
Location: Atlanta, Georgia USA

Re: Uploading files

Postby MBaas on Fri Mar 25, 2016 7:52 am

Hi Woodley,

I don't have my code wirh me atm, but IIRC it should be possible to simply write that data to file. With MS3, I remember there were some issues leading to very few slightly wrong bytes. That has been fixed and works perfectly - but I don't know abt MS2...
User avatar
MBaas
 
Posts: 156
Joined: Thu Oct 16, 2008 1:17 am
Location: Gründau / Germany

Re: Uploading files

Postby Brian|Dyalog on Tue Mar 29, 2016 1:35 pm

Hi Woodley,

Michael is correct, we found a bug in MiServer 3 related to file uploading and corrected it. I've now ported that fix back into MiServer 2 and updated the GitHub repository.

I hope this helps!

/Brian
User avatar
Brian|Dyalog
 
Posts: 120
Joined: Thu Nov 26, 2009 4:02 pm
Location: West Henrietta, NY

Re: Uploading files

Postby woody on Wed Mar 30, 2016 1:48 pm

Thanks, Brian !

yes.. I downloaded your updated MiServer 2.x from GITHUB and updated my server at APLcloud.com.

The upload now works like a charm !

We look forward to moving to MiServer 3.0 soon...

Cheers,

//W
Woodley Butler
Automatonics, Inc.
"Find your head in the APL Cloud"
http://www.APLcloud.com
User avatar
woody
 
Posts: 144
Joined: Tue Dec 28, 2010 12:54 am
Location: Atlanta, Georgia USA


Return to MiServer

Who is online

Users browsing this forum: No registered users and 1 guest