Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local path for file imports #26

Open
jeremyboggs opened this issue Feb 6, 2013 · 4 comments
Open

Local path for file imports #26

jeremyboggs opened this issue Feb 6, 2013 · 4 comments

Comments

@jeremyboggs
Copy link
Contributor

A feature idea I'd like to work on is adding support for local paths for files. Instead of relying on a full HTTP address being in the CSV file, allow people to upload the files to a server somewhere, and let them specify a path as the base bath for import along with the other settings for that CSV file.

This is usually the most problematic thing I encounter helping folks import their data from a CSV file, is that they usually only have the filenames, and not a full path. I've just been doing file and replace in the files column of the CSV file, which works fine, but I think being able to specify a base path for files would be useful.

Would like to talk this out more, since I'm sure I'm not aware of all the things such a change would affect.

@willynilly
Copy link
Contributor

Were you thinking that the base path be a setting for the entire import, or on a per column basis? Would it check to see if the file is a valid URL, and if not, then use the base file path setting?

@zerocrates
Copy link
Member

I'd be a bit leery about this, given the security considerations: you could tailor a base path and your CSV to pull in any file on the server that the webserver can access.

I've thought about this before, but more as an integration with Dropbox: let users specify a particular column refers to files in the dropbox dir. There'd still need to be some checking on the filenames to make sure they're not trying to traverse the directory structure and break out of the dropbox (things like ..).

@jeremyboggs
Copy link
Contributor Author

@willynilly

Were you thinking that the base path be a setting for the entire import, or on a per column basis?

Was thinking for the entire import, but if there are be reasons to consider it on a per-column basis, would like to hear them.

Would it check to see if the file is a valid URL, and if not, then use the base file path setting?

Hadn't considered this, but seems like it'd be a good idea!

@zerocrates

I'd be a bit leery about this, given the security considerations: you could tailor a base path and your CSV to pull in any file on the server that the webserver can access.

Excellent point that I hadn't considered!

I've thought about this before, but more as an integration with Dropbox: let users specify a particular column refers to files in the dropbox dir. There'd still need to be some checking on the filenames to make sure they're not trying to traverse the directory structure and break out of the dropbox (things like ..).

Yeah, this seems more like it. That you'd have to either have Dropbox installed, or maybe add a directory to CsvImport that it could use. Agreed about checking the file paths, and prohibit breaking out of a specified directory.

@ghost ghost assigned willynilly Feb 7, 2013
@willynilly
Copy link
Contributor

@clioweb @zerocrates Do you want to use the Dropbox plugin or should we add a directory to the CsvImport plugin? What do yal think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants