myfile.csv file getting saved as myfile.csv.txt [closed] - database

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I am facing a problem while saving a .csv file from browser.
I made a file myfile.csv and added rows into it from my database, and i asked the users to right click and save the page. But in many browser (because some browsers want to add the .txt properties to it) it is getting saved as myfile.csv.txt format.
Most people wouldn’t know to delete the .txt part from the file name so can this be adjusted to always be a .csv format?
can i add a directive to the .htaccess to recognize .csv files? Not sure though.
Please let me know what you think how this can be done.
Any help/idea would be appreciated.
Thanks in advance.

Could be a MIME type issue. Browsers sometimes have the habit of inconsistently using either the file name (extension) or MIME type, but ignoring the other. Since different browsers handle it differently you should make sure they match if you want it handled properly.

Related

upload images in database? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I would like to make a script that adds news in a database, but every newsitem needs an image. But I don't know how I have to do the part with the images, do I have to add them also in the database or is their another way to do it? And what's the best way?
Cheers
You should store path to the image and use it in code that actually loads the file by the path, specified in the DB.
Also: http://www.kirupa.com/forum/showthread.php?323567-How-to-save-image-in-folder-and-path-to-database - look over here. It is the second link in google, by the way.. you better started by looking this up over there.
Storing Images in DB - Yea or Nay? - searching stack... :)
There're 2 ways
1- Store Image in Database.
2- Store Image's file path in Database

404 - File or directory not found - with correct URL [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
i put a file name 'abc.apk' inside the "apk" 's folder and it shows
"404 - File or directory not found"
when i try to access it with my browser(tried on chrome, FF, and IE). I even try with jdownloader, and it keeps saying that the file is not found...
but it able to shows the picture if i put the picture file inside the "apk" folder. how can i solve this? i wanted the browser auto download the file after i key in the complete url.
i tried some solution from google but none of them works, they asked me to check for the url, move up 1 directory to check the available of the dir.. etc
If you are using hosting webserver, send a ticket to your hosting company and ask them to add the file extension into MIME, problem solved.

French characters are converted to garbage while getting from UI [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I have a simple portlet application on websphere portal server. On the UI (jsp), there is a text area where user enters some french text and then the portlet gets it and updates to DB.
I enter the French characters by copying from an excel sheet(not through keyboard). But when I save it, the French characters are converted to garabge and saved to DB.
What are some things I should check? This happens only in one environment. In another environment, things run fine. (i.e.French characters are proper)
EDIT: Thank you for the answers. I checked that the data is sent correctly from the browser. Also when I deploy the portlet front end locally and use the back end for SIT, it works fine. But when both the portlet and the back end are SIT, it gives the problem.
You need to make sure that data is sent properly from the browser. For that you can use Firbug to inspect the POST data.
Once you make sure that the information is sent properly,you need to verify how the data on server side.
Assume that you are getting the data from the client in processAction() method. Verify that data from the request is in the correct format. You may have to set the encoding in the ActionRequest as UTF-8. Once you have the data in the correct format you need to verify the encoding which is used in Database.

how to write a web browser from stratch use c [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
These days I'm aware of the powerful web browser. In order to know what happend behind the screen. I want to write a simple web browser. But When I try to find document about that. Nothing find! Any one konw how to write a simple web browser or know where is the book will be useful. Please tell me !
Thank you very much!
Start off with a simple browser -- e.g., look at existing text only ones like lynx or w3m. Once you've got them cracked, then you can work up to adding graphical elements. It can get complicated fairly quickly, so make sure you've read the appropriate RFCs for HTTP and the W3C standards as well. These aren't light reading material though :-)
Here's something to get you started:
https://developer.mozilla.org/en/Download_Mozilla_Source_Code
C might not be the best language for this job.

How can I monitor a directory for newly uploaded files? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I need to create a windows service that will monitor a directory for newly uploaded files.
The files will be around 100K to 400K in size.
Is there a chance that my monitoring system will notice a new file, but the file hasn't completetly finished copying over? i.e. it is still streaming in and the EOF hasn't been written yet?
Yes, there is a chance that this will happen. You should upload the file to a temporary directory first, then move it to the directory you're monitoring when the entire file is present on your file system.
Try reading the second tale here and the comments. Essentially, it's as Bill the Lizard said
yes. With small files the risk is fairly low, but if you want to be certain have it check when it sees a file to make sure it's size stays stable over a second or two.
Are you using a FileSystemWatcher? I've only used this once, but I think you can configure the parameters to tell it what events you want to consider and set up separate handlers for each. I suspect that the FileSystemWatcher may not even notify you on file creation until the file has been closed, but I haven't tried it.
Note: this is .NET solution. If you're not using .NET, please disregard.

Resources