In my project i have created a file upload.Now it is required that any exe file or exe file in a zip folder having .zip as extension, be prevented from being uploaded.
Can someoe suggest me a solution?
The application is simple, an HTML form that posts to a Perl script. The problem is we sometimes have our customers upload very large files (gt 500mb) and their internet connections can be unreliable at times.
Is there any way to resume a failed transfer like in WinSCP or is this something that can't be done without support for it in the client?
I have an application created with PhoneGap and Backbone. I upload a file as JSon and my server receive data like this :
data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/...
I'm trying to write the file like this :
File.open("#{Rails.root}/public/images/#{self.id}.jpg", "w+") do |f|
f.write(data)
end
It's not working and I don't know what to do. When I'm trying to open the file I have this message "Not a JPEG file: starts with 0x64 0x61".
Do you have a solution?
I know this should be really simple, but im having trouble getting this to work right, basically i want to have an image upload box that uploads an image and then puts the new url into a mysql database. Anyone have any advice on how to do this, as i may be having developer block but im over complicating it in my head :P Thanks
A client has the admin ability to upload a PDF to their respective directory and have it listed on their website. All of this works dandy until a PDF reaches a certain file size that makes the server time out. This causes an error and the file uploaded will not succeed.
As mentioned in the title, we are using ColdFusion with a command. Is there any java/jquery/flash modules or applications that could resolve this issue?
from title, I create Rails application and use Paperclip to manage file upload but I don't want to store file in local machine, I want to store file in other machine via ftp.
Paperclip provide to store file in S3 storage, I want to make paperclip can do like S3 but via ftp.
Help me please.
Hi I was just wondering if its possible to do an ajax post a file in asp.net mvc,
basically i have a form with two buttons, one of the buttons extracts images for the selected document and displays them for the user to choose thumbnails for the document he is about to upload. The usee then fills out the rest of the form and then saves the document.
With the image extraction, I was owndering if it was possible to do that as an ajax post. The other submit button can work as a normal http post
Thanks
can anyone plz provide me a simple working code snippet of codeigniter for uploading 2 images at once (through 2 different input field ofcourse). I need 2 images to be uploaded at once, or one after another. and both of the images need to be in different location.
I tried to make it myself by calling upload function twice but it returned last images with these extentions: *.jpg.jpg.
can anyone help
Hey there.
I'm currently working on a file uploading sript in PHP, but i'm kind of stuck. Users are allowed to upload files such as PHP and JS, but i don't want the scripts to run when a user is trying to download them. Is it possible to block that somehow using htaccess or something?
Thanks in advance.
how can i create live meter of percentage for file upload with php jquery....please don't refer me to stuff like uploadify...i want to create my own...
HI
I'd like to know how to check out the speed of a file being uploaded in real time using the curl library in c++. This is what I have written:
curl_easy_getinfo(curl,CURLINFO_SPEED_UPLOAD,&c);
But the manual says that it shows average speed, but even this doesn't seem to work with me, because I can only see a 0.
There is one more thing:
How to set an upload limit that works, because if I write this:
curl_easy_setopt(curl, CURLOPT_MAX_SEND_SPEED_LARGE, 100);
I get an error 502 message
I'm working on a web app where users can upload images which are associated with their account. I'm trying to figure out the best way to store these images in the filesystem taking into account organization and security. I'm using a JavaScript-based file uploader which has to save the images within the web root, but I'm wondering if it would be better to move the images above the web root for better security? Any thoughts on the matter would be appreciated.
i want to upload an excel file from the client to the server using asp .then it shud check the field name of the file with the oracle database table and then save its content in the database.
can somebody help me with this....??
Hi everyone,
I am planning a dynamic PHP photo gallery and having difficulty deciding on the best way to display the thumbnails after they have been retrieved via MySQL. I considered using an inline unordered list but this resulted in the thumbs being stacked one on top of the other (touching). Also tried a table but not sure how I would start the next row after x number of thumbnails.
Any suggestions on page layout for this purpose? I will be using Lightbox to cycle through the photos themselves, that isn't the issue.
Also, would a while() loop be best for fetching the list of thumbs and inserting the appropriate HTML?
Thanks!
-Ben
I am new to iphone development.I want to create an application which shows the photos in the device.I have to implement the feature of slide show also.I am using UIImagePickerController to access the photos of the device. Here is my code
- (void)viewDidLoad {
self.navigationItem.title = @"Pictures";
self.navigationController.navigationBar.tintColor = [UIColor blackColor];
self.imgpicker = [[UIImagePickerController alloc] init];
self.imgpicker.allowsImageEditing = YES;
self.imgpicker.delegate = self;
self.imgpicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
[super viewDidLoad];
}
I am not able to see the slide show tool bar at the bottom of the photo list view.I am able to see the slide show tab bar, when i directly click on photos application on my device.How can i add the slide show tool bar in my application.Please help me out.Thanks.
Hi,
Hoping to get some assistance but I am after a jQuery/PHP means of allowing a user to drag and drop files and then via PHP, upload one or more files to a specific directory on a Linux box.
I only have Firefox 3.6 as my base browser but can also move to FFox if need be.
Cann use any HTML5 features as long as I'm using Firefox 3.6
Can someone possibly point me to any examples/sites where this process is demonstrated?
I have had a look at http://www.plupload.com/index.php but this does not work in IE6.
As mentioned, would like it to work in FFox only.
Thanks.
I'm using script which is uploading files to server via flash component. Sometimes, very rarely, when trying to upload images via Firefox I get following error: IO error #2038. Searching on the net I could find reason why is it really happening to me. But I found solution for my case:
I open IE6, do the same thing there (photos are always uploaded without problem) and the when I try again in Firefox problem disappears. If someone had similar problems maybe this could help or maybe this hint could help to someone discovering cause of the problem :)
hi guyz;
i am using netbeans6.7.1 and phpmyadmin for my db to develop a java application
to manage students records
i want to upload students photos through browsing by clicking a browse buton which i have
included in my interface
I mean when i click on that button a JFilechooser pops up which filter only images(i have acomplished this)
1.) what i need is when i click on the "Attach button" of the JFilechooser, i want the image i chose to be attached to a jtextArea on the form i'm working with and the JFilechooser be diposed off.
2.) Also how i can save this form together with the image to a database table
Is there a place where i can find a good guide/tutorial about that
Like many variables in PHP using ini_set() on a page doesn't actually work.
I've recently upgraded my PHP version and found that my multiple image uploader is now capped. After 3 hours of frustration, I've found that my new PHP install has the new "max_file_uploads" parameter set to "20".
So only the first 7 images get uploaded (each is in three sizes, 7*3=21).
I can now change my php.ini value of "max_file_uploads" to 300, but I'd rather not do that side wide.
Is there any way to set that value just for a single file (upload.php)? Could a .htaccess file be used for this?
Hello!
My main issue is that I want to display an custom error page when an uploaded file exceeds allowed size (maxRequestLength in web.config).
When the big file is uploaded an HttpException is thrown before my upload action method in the controller is invoked. This is expected.
I have tried to catch the exception in a custom attribute and also to override OnException in the controller. Why isnt it possible to catch the exception in either the attribute or the OnException method?
Its possible though to catch the exception in Application_Error in global.asax but neither Response.Redirect nor Server.Transfer works for redirecting to the custom error page.
Server.Transfer gives the "failed to process child request" error and response.redirect gives the "Http headers already sent" error.
Any ideas?
Thanks in advance!
Marcus
Ok, this is driving me nuts. I have been trying to figure this out forever now. I want to to perform an async upload using ajaxFileUpload. I have it posting the file to my controller just fine, however, when i try to return a JsonResult from it, I get a "Save File As" dialog box. I have tried everything to get around this and i either get an error or the "Save As" dialog. Im assuming that it has something to do with the content type that is being passed in when the file gets posted. I would be greatly appreciative if anyone could help. Thanks in advance!
I have a Zend_Form with file element like this:
->addElement('file', 'image', array(
'required' => false,
'label' => 'Venue Image',
'validators' => array(
array('IsImage', false),
array('Size', false, '2097152'),
array('Upload', false),
),
))
And when I'm using localhost the image is uploaded successfully. But when I move to my hosting the validation error shows for image field. The mimetype of file 'foto.jpg' could not be detected. What can be the reason of this?
Hi There
I have been using SimpleRepository for months now, and for the first time i have to upload and store an Image/Document in the database
My Class looks as follow:
public class Document: ObjectMetaData
{
public string FileName { get; set; }
public Guid UserId { get; set; }
public DocumentType DocumentType { get; set; }
public string DocumentLocation { get; set; }
public byte[] DocumentData { get; set; }
}
public enum DocumentType
{
EmploymentContractSigned = 1,
EmploymentContractUnSigned = 2
}
When i persist the data to the db, subsonic just ignore's the "DocumentData"
how do i save the file to db then?
DocumantData = File.ReadAllBytes("somefile.doc")