File Upload
Permalink 1 user found helpful
I have built a block to allow the user to add bios. I need for the user to be able to upload a photo however, and I cant seem to find any straight documentation on this scenario. How would I, from a block, allow the user to add a photo and then have this photo appear in the view?
any help would be greatly appreciated - thanks!
mike
any help would be greatly appreciated - thanks!
mike
I found the Form block built into C5 helpful.
has the code for uploading file from a block.
has the code for uploading file from a block.
Thanks for the links. Although I can get around in php, unfortunately i'm not an adept developer.
The first link made some sense, but it didn't have anything along the lines of what I am asking - just general info about file uploads that I am sure developer could then make sense of and implement, but I wasnt able to take that and make the block I am needing.
The form block seems to allow adding a file upload area to a form which can be added to a page, but i am needing to have an image upload in the block, which then saves and adds the image to the div written by the view. Basically I am trying to make a block with a title, name, and bio text inputs, and also a file upload for uploading an image which attaches to that instance. The user can then add, edit and delete bios on the page this way. The text inputs are obviously a breeze. The file upload however has shown to be difficult for me. Any tutorials or blocks out there that have this functionality? Any idea on how this would be implemented? Thank for your replies so far.
The first link made some sense, but it didn't have anything along the lines of what I am asking - just general info about file uploads that I am sure developer could then make sense of and implement, but I wasnt able to take that and make the block I am needing.
The form block seems to allow adding a file upload area to a form which can be added to a page, but i am needing to have an image upload in the block, which then saves and adds the image to the div written by the view. Basically I am trying to make a block with a title, name, and bio text inputs, and also a file upload for uploading an image which attaches to that instance. The user can then add, edit and delete bios on the page this way. The text inputs are obviously a breeze. The file upload however has shown to be difficult for me. Any tutorials or blocks out there that have this functionality? Any idea on how this would be implemented? Thank for your replies so far.
I have searched around for this, and it seems that there is no way in concrete5 to allow users to add or change pictures from the frontend edit page area - is this correct?
The content block allows you to add images. Basic editing of images is handled through a web service called Picnik.
-Steve
-Steve
I too wizards suggestion and pulled code out of an existing c5 block to add the functionality - i believe it was the image block. It worked well. With this client, I would like to keep them out of the back-end as much as possible - most just aren't comfortable with directories and cms's. But all things considered, this works well. Thanks for all your help.
Would you be willing to share?
http://www.concrete5.org/documentation/developers/files/using-in-bl...
http://www.concrete5.org/documentation/developers/files/importers...