Skip to content

Commit

Permalink
bugfix release 2.0.1 changes:
Browse files Browse the repository at this point in the history
- Performance Improvements for Chunked File Uploads
- Improved Client Side Debug Logging
- Oracle Database EPG Note in Docs & Help Pages
  • Loading branch information
Daniel Hochleitner committed Dec 31, 2016
1 parent f042547 commit b27c2e2
Show file tree
Hide file tree
Showing 6 changed files with 363 additions and 358 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ https://apex.oracle.com/pls/apex/f?p=APEXPLUGIN

## Changelog

### 2.0.0 - Complete new Version built from ground up. Now much easier to use and with more features
#### 2.0.1 - Performance Improvements for Chunked File Uploads / Improved Client Side Debug Logging / Oracle Database EPG Note in Docs & Help Pages

#### 2.0.0 - Complete new Version built from ground up. Now much easier to use and with more features

- Choose where to save the Files (APEX Collection or Custom Table)
- No more writing of custom PL/SQL Code inside the Plugin (much more Update save)
Expand Down Expand Up @@ -102,12 +104,12 @@ The plugin settings are highly customizable and you can change:
- **Normal**
- **AJAX:** Async Method

- This Upload Method encodes the File into a Base64 String. This String is then split into an 30kb Array which sends the encoded/splitted File in **1 Request** to the Server. This Method works on all Web Servers including Oracle OHS, Oracle WebTier, Oracle ORDS, Apache, Tomcat. But for large Files the **maxPostSize** Parameter have to be increased on Tomcat Servers (Default 2MB).
- This Upload Method encodes the File into a Base64 String. This String is then split into an 30kb Array which sends the encoded/splitted File in **1 Request** to the Server. This Method works on all Web Servers including Oracle OHS, Oracle WebTier, Oracle Database EPG, Oracle ORDS, Apache, Tomcat. But for large Files the **maxPostSize** Parameter have to be increased on Tomcat Servers (Default 2MB).

- **Chunked**
- **AJAX:** Async Method

- This Upload Method encodes the File into a Base64 String. This String is then split into an 1MB Array which sends the encoded/splitted File in **Multiple Requests** (For every MB 1 Request) to the Server. This Method works best on modern Web Servers like ORDS, Tomcat or Apache, but not on Oracle OHS or Oracle WebTier! This Method is good, when you don´t have the possibility to configure Parameters of the Web Server like **maxPostSize**. If you can edit the Web Servers Config you should go with the *Normal* Mechanism. But if you expect a lot of big files that get uploaded this Method should be fine for that!
- This Upload Method encodes the File into a Base64 String. This String is then split into an 1MB Array which sends the encoded/splitted File in **Multiple Requests** (For every MB 1 Request) to the Server. This Method works best on modern Web Servers like ORDS, Tomcat or Apache, but not on Oracle OHS, Oracle WebTier or Oracle Database EPG! This Method is good, when you don´t have the possibility to configure Parameters of the Web Server like **maxPostSize**. If you can edit the Web Servers Config you should go with the *Normal* Mechanism. But if you expect a lot of big files that get uploaded this Method should be fine for that!

- **Delete Files**

Expand Down
2 changes: 1 addition & 1 deletion apexplugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name" : "Dropzone",
"version" : "2.0.0",
"version" : "2.0.1",
"description" : "Dropzone is a region type plugin that allows you to provide nice looking drag’n’drop file uploads.",
"keywords" : ["dropzone","drag","drop","file","upload","multi","multiple"],
"homepage" : "https://github.com/Dani3lSun/apex-plugin-dropzone",
Expand Down
20 changes: 10 additions & 10 deletions server/js/apexdropzone.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// APEX Dropzone functions
// Author: Daniel Hochleitner
// Version: 2.0.0
// Version: 2.0.1

// global namespace
var apexDropzone = {
Expand Down Expand Up @@ -144,13 +144,13 @@ var apexDropzone = {
vJsonReturn = jQuery.parseJSON(pData);
} catch (err) {
apex.debug.log('uploadDzFiles Response ParseError', err);
vJsonReturn = jQuery.parseJSON('{ "status": "error", "message": "uploadDzFiles Response ParseError" }');
vJsonReturn = jQuery.parseJSON('{ "status": "error", "message": "uploadDzFiles Response ParseError", "code": "AJAX Callback (pData) ParseError" }');
}
// response error
if (vJsonReturn.status == 'error') {
// APEX event
apex.debug.log('uploadDzFiles Error', vJsonReturn.message);
apex.event.trigger('#' + pRegionId, 'dropzone-upload-error', vJsonReturn.message);
apex.debug.log('uploadDzFiles Error', vJsonReturn.message, vJsonReturn.code);
apex.event.trigger('#' + pRegionId, 'dropzone-upload-error', vJsonReturn);
// file status
file.status = Dropzone.ERROR;
pDropzone.emit("error", file, "Database error during file upload");
Expand Down Expand Up @@ -273,13 +273,13 @@ var apexDropzone = {
vJsonReturn = jQuery.parseJSON(pData);
} catch (err) {
apex.debug.log('uploadDzFilesChunked Response ParseError', err);
vJsonReturn = jQuery.parseJSON('{ "status": "error", "message": "uploadDzFilesChunked Response ParseError" }');
vJsonReturn = jQuery.parseJSON('{ "status": "error", "message": "uploadDzFilesChunked Response ParseError", "code": "AJAX Callback (pData) ParseError" }');
}
// response error
if (vJsonReturn.status == 'error') {
// APEX event
apex.debug.log('uploadDzFilesChunked Error', vJsonReturn.message);
apex.event.trigger('#' + pRegionId, 'dropzone-upload-chunk-error', vJsonReturn.message);
apex.debug.log('uploadDzFilesChunked Error', vJsonReturn.message, vJsonReturn.code);
apex.event.trigger('#' + pRegionId, 'dropzone-upload-chunk-error', vJsonReturn);
// file status
file.status = Dropzone.ERROR;
pDropzone.emit("error", file, "Database error during file upload");
Expand Down Expand Up @@ -367,13 +367,13 @@ var apexDropzone = {
vJsonReturn = jQuery.parseJSON(pData);
} catch (err) {
apex.debug.log('deleteDzFile Response ParseError', err);
vJsonReturn = jQuery.parseJSON('{ "status": "error", "message": "deleteDzFile Response ParseError" }');
vJsonReturn = jQuery.parseJSON('{ "status": "error", "message": "deleteDzFile Response ParseError", "code": "AJAX Callback (pData) ParseError" }');
}
// response error
if (vJsonReturn.status == 'error') {
// APEX event
apex.debug.log('deleteDzFile Error', vJsonReturn.message);
apex.event.trigger('#' + pRegionId, 'dropzone-delete-error', vJsonReturn.message);
apex.debug.log('deleteDzFile Error', vJsonReturn.message, vJsonReturn.code);
apex.event.trigger('#' + pRegionId, 'dropzone-delete-error', vJsonReturn);
// response success
} else if (vJsonReturn.status == 'success') {
// APEX event
Expand Down
Loading

0 comments on commit b27c2e2

Please sign in to comment.