0
我将此代码嵌入到我的博客页面中,将视频文件以及上传者的电子邮件和姓名上传到我的保管箱或我的谷歌驱动器。我正在使用下面的代码,但我不知道如何指定文件应该上传到谁的谷歌驱动器或Dropbox帐户(和文件夹),如果它正在上传,以及上传器(名称和电子邮件)与视频文件一起上传。我买不起网络主机空间,所以现在我必须使用博主,保管箱或我的谷歌驱动器(所有免费服务)来完成此项任务。先谢谢你。你们好棒!HTML代码将文件上传到Dropbox或谷歌驱动器以及名称和电子邮件?
<div dir="ltr" style="text-align: left;" trbidi="on">
<!-- Paste this into forms.html -->
<!-- Text input fields -->
<input id="name" placeholder="Your Name" type="text" />
<input id="email" placeholder="Your Email" type="email" />
<!-- File upload button -->
<input id="file" type="file" />
<!-- Form submit button -->
<button onclick="submit(); return false;">Submit</button>
<!-- Show Progress -->
<br />
<div id="progress">
</div>
<!-- Add the jQuery library -->
<script src="https://code.jquery.com/jquery.min.js"></script>
<script>
var file,
reader = new FileReader();
// Upload the file to Google Drive
reader.onloadend = function(e) {
google.script.run
.withSuccessHandler(showMessage)
.uploadFileToGoogleDrive(
e.target.result, file.name,
$('input#name').val(),
$('input#email').val()
);
};
// Read the file on form submit
function submitForm() {
file = $('#file')[0].files[0];
showMessage("Uploading file..");
reader.readAsDataURL(file);
}
function showMessage(e) {
$('#progress').html(e);}
</script></div>