upload

trouble save the image upload in php

删除回忆录丶 提交于 2019-12-12 07:03:08
问题 i have this master page and a web form with the master page the problem i have is that the code wont run or save into the folder i want it to, so how do i change the code in the vb? basically i have a javascript which have a input that allow me to upload a file or image, but the problem, it seem like total skip the code inside <script type = "text/javascript"> var counter = 0; function AddFileUpload() { var div = document.createElement('DIV'); div.innerHTML = '<input id="file' + counter + '"

CarrierWaveDirect Without Processing

。_饼干妹妹 提交于 2019-12-12 06:56:27
问题 I have a document model that consists of PDF files. Because I don't need to manipulate the PDFs in any way, I'm attempting to use CarrierWaveDirect without its processing step, which I believe is downloading and re-uploading the files. My uploader looks like this: class DocumentUploader < CarrierWave::Uploader::Base include CarrierWave::RMagick include CarrierWave::MimeTypes include CarrierWaveDirect::Uploader def will_include_content_type true end default_content_type 'application/pdf'

Symfony custom filename for uploaded image files

邮差的信 提交于 2019-12-12 06:46:40
问题 I'm aware of VichUpload and namers, but I have to face two different file uploads, and I need special naming conventions that I'm unable to get with the current VichUpload documentation. First file upload is for an entity called "School", which manages every single school, and its logo. So, taking as web root '../web/files/schools/', then I'd take the school_id and then the 'logo' folder with the uploaded file name, so it could be '../web/files/schools/000001/logo.png'. Then, the second

How to fetch data from ajax in php

故事扮演 提交于 2019-12-12 06:16:34
问题 I am passing image from a form to a php page using ajax. Problem is that the data is not getting fetched and giving a blank output. Following is my code: test.php <!-- Help taken from http://stackoverflow.com/questions/24446281/passing-image-using-ajax-to-php --> <form name="saveImg" enctype="multipart/form-data" id="saveImg"> <input type="file" name="imgVid" id="imgVid"> <button name="submit" id="submit">Upload</button> <img src="skin/images/process.gif" id="procimg" height="32" width="auto"

How to use CopyIntoItems to copy files into existing doclib items

我怕爱的太早我们不能终老 提交于 2019-12-12 05:48:54
问题 This is my scenario: I need to copy files to a sharepoint document library using its web services and set metadata on them. That's all possible with CopyIntoItems (from Copy webservice) except for Lookup fields. CopyIntoItems ignores them, so i need another way to set data on those fields. I've tried to create a list item with the mandatory and lookup fields metadata and then, using the item ID (creating a FieldInformation field with the ID, as well as some other simple metadata), called the

How to display a grid with text like Pinterest?

两盒软妹~` 提交于 2019-12-12 05:09:28
问题 I want to display a grid with text like Pinterest does with images. My site is a news feed site were users can upload texts. The code for displaying and getting the text from the database is: <?php //connect mysql_connect("host","username","password") or die(mysql_error()); mysql_select_db("database_name") or die(mysql_error()); //query the database $getnews = mysql_query("SELECT * FROM news ORDER BY id DESC") or die(mysql_query()); while ($row = mysql_fetch_assoc($getnews)) { //get data $id

alert then reload page IN detect file extension upload script

别说谁变了你拦得住时间么 提交于 2019-12-12 05:07:37
问题 I'm using this javascript to limit the extension of the file type when uploading: function TestFileType( fileName, fileTypes ) { if (!fileName) return; dots = fileName.split(".") //get the part AFTER the LAST period. fileType = "." + dots[dots.length-1]; return (fileTypes.join(".").indexOf(fileType) != -1) ? alert('Correct File Type Function Here') : alert('Wrong File Type Function Here'); } with <input name="replay_file" id="replay_file" type="file"/> <input type="submit" id="upload_file"

Need help using Wininet Functions

依然范特西╮ 提交于 2019-12-12 04:55:18
问题 I am programming in C++ and I want to upload a file to my web server which i have already done using the following code: #include "stdafx.h" #include <windows.h> #include <wininet.h> #pragma comment(lib, "wininet") int _tmain(int argc, _TCHAR* argv[]) { HINTERNET hInternet; HINTERNET hFtp; hInternet = InternetOpen(NULL, INTERNET_OPEN_TYPE_DIRECT, NULL,NULL,0); hFtp = InternetConnect(hInternet, L"ftp.freetzi.com", INTERNET_DEFAULT_FTP_PORT, L"myuser.freetzi.com", "mypassword", INTERNET_SERVICE

Editing user uploaded files?

不想你离开。 提交于 2019-12-12 04:53:27
问题 We have a form where user can submit a message, as well as upload 1-10 files (not displayed in-line in the message, but as links at the bottom of the message). This is all working fine so far... using two separate forms. 1 x form (MAIN/parent form) is the message details form (name. date, message..etc) 1 x form that is under this form, and if for handling the selected/uploading of user selected files. This is done through a hidden iFrame and dedicated php script, and returns a list of

mysql restore for files on another server

落爺英雄遲暮 提交于 2019-12-12 04:47:09
问题 I have a test database on a separate remote server than my production DB. Every once in awhile, I want to try and test things by uploading a copy of my production DB to my testing DB. Unfortunately, the backup file is now half a gig and I'm having trouble transferring it via FTP or SSH. Is there an easy way that I can use the mysql restore command between servers? Also, is there another way to move over large files that I'm not considering? Half a gig doesn't seem that big, I would imagine