简体   繁体   中英

grocery crud file upload field pick file from server

I'm developing a web site with codeigniter + grocery crud .

I really like the upload file feature from grocery crud.

But I'm wondering if it's possible to pick a file from a server folder instead of uploading it. I mean just put the name of the file in the field.

I don't want to write more than what is needed.

Edit: I want the user to be able to do both: upload a file, or pick it from a server folder.

I've been asking myself the same question. I was thinking in doing it like this:
1 - Create a Media Library table (Wordpress style) and store all the file uploads in a table.
2 - Add a relation field to select images form this table. http://www.grocerycrud.com/examples/set_a_relation

The basic relation field will generate a select that allows you to select images by name, id, description, etc.
This is not very user friendly, so I guess you'll have to write one or two callback functions to show the users the image they are selecting

this is the approach I'll be using on my next codeigniter+grocerycrud project :)

Good luck!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM