Page 1 of 2

Ability to upload file

Posted: Thu Oct 24, 2019 1:24 pm
by Paul
Ability to upload a file natively from SpiderBasic.

Basically to be able to do something as simple as this...

Code: Select all

<form action='https://127.0.0.1/cgi-bin/mydata.cgi' method='post' enctype='multipart/form-data'>
Subject<br>
  <input type='text' name='subject'><br>
  <input type='hidden' name='pass' value='test data'><br>
  <input type='file' name='file1' id='file1'><br>
  <input type='file' name='file2' id='file2'><br>
  <br>
  <input type='reset' value='Clear' name='clear'>
  &nbsp;&nbsp;&nbsp;&nbsp;
  <input type='submit' value='Send' name='senddata'>
</form>

Re: Ability to upload file

Posted: Wed Jun 10, 2020 11:55 am
by Dirk Geppert
+1

Re: Ability to upload file

Posted: Wed Jun 10, 2020 2:24 pm
by falsam

Re: Ability to upload file

Posted: Wed Jun 10, 2020 3:13 pm
by Paul
Although this "UploadGadget" you mention has its purpose, it does not do the same as the code snippet above so it cannot be used as a workaround.

Re: Ability to upload file

Posted: Thu Jun 11, 2020 2:33 pm
by Peter
@Paul: What about this one?

Re: Ability to upload file

Posted: Thu Jun 11, 2020 6:43 pm
by Paul
Peter wrote:@Paul: What about this one?
Thanks Peter,
It looks like I can use formData.append in that code to add the extra text fields to go with the files so it may work for what I need.
I'll let you know my progress. :)

Re: Ability to upload file

Posted: Thu Jun 11, 2020 8:25 pm
by Peter
Paul wrote:
Peter wrote:@Paul: What about this one?
Thanks Peter,
It looks like I can use formData.append in that code to add the extra text fields to go with the files so it may work for what I need.
I'll let you know my progress. :)
Currently I am working on an upload dialog.

Prototype:
Image

Re: Ability to upload file

Posted: Fri Jun 12, 2020 6:05 am
by Dirk Geppert
@Peter: That sounds promising!

Re: Ability to upload file

Posted: Fri Jun 12, 2020 8:13 am
by Peter

Re: Ability to upload file

Posted: Fri Jun 12, 2020 11:59 am
by Dirk Geppert
Looks good. :) During testing I noticed, that if you have already started once the upload, every new added file is marked as successfully uploaded then.