How to make a download link button for doc files in vuejs - vue.js

I have a form to edit, upload and download doc files. The form is like this-
The edit form has many input fields. But I am showing only the file fields.
My questions:
How to download available files ? I was given a base url. The base url is - "http://45..........". And my codes are-
Brd Doc
<input
type="file"
ref="softCopy1"
v-on:change="softCopyAttach1"
/>Download<br /><br>
<label for="">Sow Doc</label>
<input
type="file"
ref="softCopy2"
v-on:change="softCopyAttach2"
/>Download<br /><br>
<label for="">Srs Doc</label>
<input
type="file"
ref="softCopy3"
v-on:change="softCopyAttach3"
/>Download<br /><br>
<label for="">Uat Doc</label>
<input
type="file"
ref="softCopy4"
v-on:change="softCopyAttach4"
/>Download<br /><br>
<label for="">Technical Soln</label>
<input
type="file"
ref="softCopy5"
v-on:change="softCopyAttach5"
/>Download<br /><br>
<label for="">Finan break</label>
<input
type="file"
ref="softCopy6"
v-on:change="softCopyAttach6"
/>Download<br /><br>
<label for="">Final finan</label>
<input
type="file"
ref="softCopy7"
v-on:change="softCopyAttach7"
/>Download<br /><br>
</div>
I have included anchor link to get files from backend. So what to write inside to download the file?
Here is a pic of the datas that I am getting from backend using api-
The file keys are- brd_doc, sow_doc and so on.....
My second question is suppose I have inserted a file during create new in key brd_doc. After insertion, when I will edit, I have inserted another file in key sow_doc and kept brd_doc empty. Now the file which I had uploaded during create new in key brd_doc gets deleted. But I want to keep it. How can I do this ?

Related

How to send a SPECIFIC file using a ASPUpload?

I want to send a time.txt by aspUpload (persist) without a form choice.
My code is:
<FORM METHOD="POST" ENCTYPE="multipart/form-data" ACTION="Up1.asp">
<INPUT multiple TYPE=FILE SIZE=50 NAME="FILE1" id=ARQ accept=".s3dx" onchange="ChangeFile();">
<INPUT TYPE=SUBMIT VALUE="Send Files" id=BT>
</FORM>
But i can to use: FILE = "time.txt"
is it possible?
I never change the file

How to stay on the same page after a form submission integrated to a Google form

In my website i have a contact form, and i've integrated it with a Google form. I've added the google form's execute URL as the action URL so once its submitted the form is being populated with the form data. the way i have done it
But when its being submitted, its redirecting to a google form's response page. What i need is once its submitted, to stay on the same page and give an alert. Im not sure how to do this in vue js. Any suggestion will be appreciated.
the content on the redirected page
{"result":"success","data":"{\"name\":[\"sdvsdv\"],\"company\":[\"dsvdv\"]}"}
Form in vue js view
<form method="POST" id="appointment-form" action="https://script.google.com/macros/s/AKfycbzRHvjfmIZdwKnOm26PeFv64OyyyGAfcr68MxvYw/exec">
<div class="form-group">
<input type="text" placeholder="Your name" name="name" class="form-control" id="name" required>
</div>
<div class="form-group">
<input type="text" placeholder="Company name" name="company" class="form-control" id="company" required>
</div>
<buttontype="submit" class="btn btn-default btn-block form-submit-btn">Submit</button>
</form>
After read your code properly, i found many errors.
How are you saving input values?
To save, you have to use ```v-model directive````
I guess you save the input values in somewhere. To avoid your problem, you can add a method and call it on submit, and inside the method save your input values.

When using boto3.client('s3').generate_presigned_post to generate an URL for a file upload via form submit an error from AWS occurs

As mentioned in this question's title, when using the boto3.client('s3').generate_presigned_post to generate an upload URL as per here and injecting the response of the function into the following form:
<form class="s3-upload" action="URL_VALUE" method="post" enctype="multipart/form-data">
<input type="hidden" name="key" value="VALUE"/>
<input type="hidden" name="AWSAccessKeyId" value="VALUE"/>
<input type="hidden" name="policy" value="VALUE"/>
<input type="hidden" name="signature" value="VALUE"/>
<input type="hidden" name="success_action_redirect" value="VALUE"/>
<input type="file" name="file" class="upload-input">
<p class="drag-text">Drag your file here or click in this area.</p>
<button id="uploadS3" type="submit" title="">Upload</button>
</form>
I receive the following error from AWS: The AWS Access Key Id you provided does not exist in our records.
The application runs inside a docker on AWS Fargate and has an AWS role attached to it. This must probably have something to do with the solution because the whole functionality works fine on my local machine. Furthermore, all other AWS related operations with S3 (also with SQS) work fine with that AWS Fargate/AWS role setting. I'm looking forward to any suggestions about what to do.

Google Custom Search with SEO URL

Well i have this search engine into my site
<form action="/apps/search/" name="g_search" id="cse-search-box" method="post">
<input type="hidden" name="cof" value="FORID:11;NB:1" />
<input type="hidden" name="ie" value="utf-8" />
<input type="text" autocomplete="off" name="google_seach" class="search-text" onfocus="searchtext('focus')" onblur="searchtext('blur')" />
<label style="color:#796b6b;float:left;padding:0;">|</label>
<input type="submit" style="float:right;margin-top:3px;cursor:pointer;width:16px;height:16px;background:url(/template/img/main/search-icon.jpg);border:none;" value="" alt="Αναζήτηση" title="Αναζήτηση" />
</form>
Now i want some code to results page.Somehow the post request readed from a file called search.php
This file have access to $_POST[] array..
The file initializes $selector variable (for template use).
What we want to echo into contentarea div must put into $body variable..
Any help?
<?php
$selector="search";
$body="<div id=\"cse-search-form\" style=\"width: 100%;\">Loading</div>";
?>
I have a similar issue, just use GCS code provide by Google as it easy, make sure in the option in GSE you select to visualize the search result on your page and not an Iframe

[Symfony]--sfGuardPlugin--SignIn

I use symfony 1.4
In my index page, I have created some fields as login form.
When using sfGuardPlugin, it generate automaticly its form.
So, what I'm searching for is how to replace the default form created by the new which I have created.
thanks
By default, sfGuardAuth module comes with 2 very simple templates:
signinSuccess.php
secureSuccess.php
If you want to customize one of these templates:
Create a sfGuardAuth module in your application (don't use the
init-module task, just create a sfGuardAuth directory)
Create a template with the name of the template you want to customize in
the sfGuardAuth/templates directory
symfony now renders your template instead of the default one
More info: https://github.com/Garfield-fr/sfDoctrineGuardPlugin
Edit:
You must set up the settings.yml
enabled_modules: [default, sfGuardAuth, sfGuardUser]
.actions:
login_module: sfGuardAuth
login_action: signin
This is my signinSuccess.php
<h2>Bejelentkezés</h2>
<form id="loginform" action="<?php echo url_for('#sf_guard_signin') ?>" method="post">
<input type="hidden" name="signin[_csrf_token]" value="2a831d070cdd61d81bb1572be3f52d21" id="signin__csrf_token" /> <p>
<label class="required" for="username">Felhasználónév vagy Email:</label><br/>
<input type="text" name="signin[username]" id="signin_username" class="text" /> </p>
<p>
<label class="required" for="password">Jelszó:</label><br/>
<input type="password" name="signin[password]" id="signin_password" class="text" /> </p>
<p>
<input type="submit" class="btn btn-green big" value="Signin" />
</p>
<div class="clear"> </div>
<?php echo $form->renderHiddenFields(); ?>
</form>