Create Our Own Module to Upload Documents in Drupal 7

9 Oct

rferdian45

Drupal 7 allows us to create our own modules to Upload and Download documents.

I was assigned to create a web form to upload documents in drupal 7 that runs in a Linux machine. Please see Figure 1.

Figure 1 shows us a web form to upload a file project. Please see Figure 2 for the code behind the page.

Figure 2 shows us some codes that displays some components of the upload documents web form. However, Figure 2 doesn’t show the codes that used to take care of the data after a user hit button “Upload”. Please see Figure 3 to read the code that insert the data into the database.

The good thing about drupal is drupal provides us a function to take care the files that we upload on the application. In the fourth line on the Figure 3, there is a method called “file_save_upload()”. This method…

View original post 17 more words

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: