Iam trying to upload the video but when file uploads the following response displays
Video file name is missing: Slug header required.
Code is
<form action="http://uploads.gdata.youtube.com/feeds/api/users/default/uploads?
access_token=ya29.AHES6ZQSxuX5deUDikYEa9iihA06w95he2kq95e4u2HFc3vAWT9giTk&
key=AI39si7vDYyjPjmP7OKjN0ELwuW6k2geVKgwJqvDNVtLEsPotZJZ1OnRIfk519o7pabt_m8PQxKKp6Y9sUvbfxSx5M6JlhimQA&
nexturl=http://localhost:8080/web/authorized.html" method="post"
enctype="multipart/form-data" onsubmit="return checkForFile();">
<input id="file" type="file" name="file"/>
<div id="errMsg" style="display:none;color:red">
You need to specify a file.
</div>
<input type="hidden" id="access_token" value="TOKEN"/><br>
<input type="submit" value="go" />
</form>
Some metadata's are missing. You have to send xml about video before uploading it.
Related
I have a chatbot and I want to use webview forms when the "survey" is "non-linear"
I have this form. What to "place" in the action if I want to tell the bot to catch the data?
<form action="I SEARCHING FOR THIS" method="GET">
<input type="text" name="foo" placeholder="foo" />
<input type="text" name="bar" placeholder="bar" />
<button type="submit">SUBMIT</button>
</form>
Action should be sent to the URL for your webhook. Also, if you are sending data you should POST not GET.
I am using the html code for a simple Paypal buy button but was wondering if it's possible to setup an auto return url without having to do it through my own Paypal account itself?
I can't do it that way because it is a localhost website (cannot validate a real website) and I'm not creating a button through my selling tools.
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<!-- Identify your business so that you can collect the payments. -->
<input type="hidden" name="business" value="email#email.com">
<!-- Specify a Buy Now button. -->
<input type="hidden" name="cmd" value="_xclick">
<!-- Specify details about the item that buyers will purchase. -->
<input type="hidden" name="item_name" value="Demo">
<input type="hidden" name="amount" value="0.01">
<input type="hidden" name="currency_code" value="GBP">
<input type="hidden" name="return" value="~/">
<!-- Display the payment button. -->
<input type="image" name="submit" border="0" src="https://www.paypal.com/en_US/i/btn/btn_buynow_LG.gif" alt="PayPal - The safer, easier way to pay online">
<img alt="" border="0" width="1" height="1" src="https://www.paypal.com/en_US/i/scr/pixel.gif">
</form>
Yes you can set your own return URL. HTML Special Variables. You can add this code to your form.
<input type="hidden" name="return" value="http://localhost" />
In your html you are defining a relative path to your home directory but you will need an HTTP or HTTPS url for it to work. This is because the page that the paypal checkout is on is not in your root directory, so it needs a specific location.
When I submit the following form
<form name="fileUpload" id="fileUpload" method="post" action="javascript:void(0);" enctype="multipart/form-data">
<input id='id' type=text name='id' value='H123'>
<div class="file_browser">
<input type="file" name="multiple_files[]" id="_multiple_files" class="hide_broswe" multiple />
</div>
<div class="file_upload">
<input type="submit" value="Upload" class="upload_button" />
</div>
</form>
The files[] get uploaded OK but input "#id" is not in the $_POST array.
I need it because I want to pass the name of the directory that the images are to be stored in.
I notice that you are missing quotation marks around 'text' in
<input id='id' type=text name='id' value='H123'>
Which should be:
<input id='id' type='text' name='id' value='H123'>
Besides that I can't see any obvious reason why it shouldn't work.
I'm building a site on rails and backbone. On the front end I have a simple form:
<form action="/api/users" method="post">
<input type="file" name="profile_image" />
<input type="submit" value="submit" />
<input type="hidden" name="id" value="1">
<input type="hidden" name="method" value="put">
<input type="hidden" name="authenticity_token" value="<%= csrf_token %>">
</form>
When I post this form and print params[:profile_image] from my UsersController the line
logger.debug params[:profile_image].class
just returns
String.
Where's the file?
For what it's worth, I'm using carrierwave, but don't want to mount an uploader. I would just like to pass a file to myUploader.store!.
You need to set enctype on your form in order to submit files. See http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.2
Example
<form action="/api/users" enctype="multipart/form-data" method="post">
This is my markup:
<form action="/Customer/Create" enctype="multipart/form-data" method="post">
<input id="file" type="file" style="width:300px" />
<input type="submit" id="btnSubmit" value="Add Image to S3" />
</form>
When I step through the Create action the Request.Files is empty. I've searched and searched and all the advice seems to be about ensuring the enctype is set to "multipart/form-data" which I have already set. Any other ideas?
Try adding a name attribute to the input. I don't think nameless form items get posted at all.