Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/pqina/filepond
Browse files Browse the repository at this point in the history
  • Loading branch information
rikschennink committed Oct 5, 2020
2 parents 6f0a511 + 8a755b7 commit 95cc575
Show file tree
Hide file tree
Showing 10 changed files with 138 additions and 19 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ FilePond is maintained by **[Rik Schennink](https://twitter.com/rikschennink/)**

* [React](https://github.com/pqina/react-filepond)
* [Vue](https://github.com/pqina/vue-filepond)
* [Svelte](https://github.com/pqina/svelte-filepond)
* [jQuery](https://github.com/pqina/jquery-filepond)
* [Angular](https://github.com/pqina/ngx-filepond)
* [Angular 1](https://github.com/johnnyasantoss/angularjs-filepond) ([johnnyasantoss/angularjs-filepond](https://github.com/johnnyasantoss/angularjs-filepond))
Expand Down Expand Up @@ -150,6 +151,7 @@ To build the library run `npm run build`

## Publications

* [Applying Watermarks to Images with FilePond](https://pqina.nl/blog/applying-watermarks-to-images-with-filepond/)
* [Generating Image Thumbnails in the Browser using JavaScript and FilePond](https://dev.to/pqina/generating-image-thumbnails-in-the-browser-using-javascript-and-filepond-10b8)
* [How to upload files with Vue and FilePond](https://dev.to/pqina/how-to-upload-files-with-vue-and-filepond-1m02)
* [Smooth file uploading with React and FilePond](https://itnext.io/uploading-files-with-react-and-filepond-f8a798308557)
Expand Down
12 changes: 6 additions & 6 deletions dist/filepond.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -1914,7 +1914,7 @@ const defaultOptions = {
ignoredFiles: [['.ds_store', 'thumbs.db', 'desktop.ini'], Type.ARRAY],

// Upload related
instantUpload: [true, Type.BOOLEAN], // Should upload files immidiately on drop
instantUpload: [true, Type.BOOLEAN], // Should upload files immediately on drop
maxParallelUploads: [2, Type.INT], // Maximum files to upload in parallel

// Chunks
Expand Down Expand Up @@ -4234,7 +4234,7 @@ const actions = (dispatch, query, state) => ({
item.abortProcessing().then(doUpload ? upload : () => {});
};

// if we should re-upload the file immidiately
// if we should re-upload the file immediately
if (item.status === ItemStatus.PROCESSING_COMPLETE) {
return revert(state.options.instantUpload);
}
Expand Down Expand Up @@ -4740,7 +4740,7 @@ const actions = (dispatch, query, state) => ({
return;
}

// id we are allowed to upload the file immidiately, lets do it
// id we are allowed to upload the file immediately, lets do it
if (query('IS_ASYNC') && state.options.instantUpload) {
dispatch('REQUEST_ITEM_PROCESSING', { query: item.id });
}
Expand Down Expand Up @@ -5030,7 +5030,7 @@ const actions = (dispatch, query, state) => ({
}),

REQUEST_REVERT_ITEM_PROCESSING: getItemByQueryFromState(state, item => {
// not instant uploading, revert immidiately
// not instant uploading, revert immediately
if (!state.options.instantUpload) {
dispatch('REVERT_ITEM_PROCESSING', { query: item });
return;
Expand Down Expand Up @@ -7331,7 +7331,7 @@ const guesstimateMimeType = (extension = '') => {

const requestDataTransferItems = dataTransfer =>
new Promise((resolve, reject) => {
// try to get links from transfer, if found we'll exit immidiately (unless a file is in the dataTransfer as well, this is because Firefox could represent the file as a URL and a file object at the same time)
// try to get links from transfer, if found we'll exit immediately (unless a file is in the dataTransfer as well, this is because Firefox could represent the file as a URL and a file object at the same time)
const links = getLinks(dataTransfer);
if (links.length && !hasFiles(dataTransfer)) {
return resolve(links);
Expand Down Expand Up @@ -9673,7 +9673,7 @@ const hasCSSSupports = () => 'supports' in (window.CSS || {}); // use to detect
const isIE11 = () => /MSIE|Trident/.test(window.navigator.userAgent);

const supported = (() => {
// Runs immidiately and then remembers result for subsequent calls
// Runs immediately and then remembers result for subsequent calls
const isSupported =
// Has to be a browser
isBrowser() &&
Expand Down
12 changes: 6 additions & 6 deletions dist/filepond.js
Original file line number Diff line number Diff line change
Expand Up @@ -3950,7 +3950,7 @@
ignoredFiles: [['.ds_store', 'thumbs.db', 'desktop.ini'], Type.ARRAY],

// Upload related
instantUpload: [true, Type.BOOLEAN], // Should upload files immidiately on drop
instantUpload: [true, Type.BOOLEAN], // Should upload files immediately on drop
maxParallelUploads: [2, Type.INT], // Maximum files to upload in parallel

// Chunks
Expand Down Expand Up @@ -6669,7 +6669,7 @@
item.abortProcessing().then(doUpload ? upload : function() {});
};

// if we should re-upload the file immidiately
// if we should re-upload the file immediately
if (item.status === ItemStatus.PROCESSING_COMPLETE) {
return revert(state.options.instantUpload);
}
Expand Down Expand Up @@ -7224,7 +7224,7 @@
return;
}

// id we are allowed to upload the file immidiately, lets do it
// id we are allowed to upload the file immediately, lets do it
if (query('IS_ASYNC') && state.options.instantUpload) {
dispatch('REQUEST_ITEM_PROCESSING', { query: item.id });
}
Expand Down Expand Up @@ -7545,7 +7545,7 @@
REQUEST_REVERT_ITEM_PROCESSING: getItemByQueryFromState(state, function(
item
) {
// not instant uploading, revert immidiately
// not instant uploading, revert immediately
if (!state.options.instantUpload) {
dispatch('REVERT_ITEM_PROCESSING', { query: item });
return;
Expand Down Expand Up @@ -10161,7 +10161,7 @@
dataTransfer
) {
return new Promise(function(resolve, reject) {
// try to get links from transfer, if found we'll exit immidiately (unless a file is in the dataTransfer as well, this is because Firefox could represent the file as a URL and a file object at the same time)
// try to get links from transfer, if found we'll exit immediately (unless a file is in the dataTransfer as well, this is because Firefox could represent the file as a URL and a file object at the same time)
var links = getLinks(dataTransfer);
if (links.length && !hasFiles(dataTransfer)) {
return resolve(links);
Expand Down Expand Up @@ -12782,7 +12782,7 @@
};

var supported = (function() {
// Runs immidiately and then remembers result for subsequent calls
// Runs immediately and then remembers result for subsequent calls
var isSupported =
// Has to be a browser
isBrowser() &&
Expand Down
39 changes: 39 additions & 0 deletions locale/hu-hu.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
export default {
labelIdle: 'Mozgasd ide a fájlt a feltöltéshez, vagy <span class="filepond--label-action"> tallózás </span>',
labelInvalidField: 'A mező érvénytelen fájlokat tartalmaz',
labelFileWaitingForSize: 'Fáljméret kiszámolása',
labelFileSizeNotAvailable: 'A fájlméret nem elérhető',
labelFileLoading: 'Töltés',
labelFileLoadError: 'Hiba a betöltés során',
labelFileProcessing: 'Feltöltés',
labelFileProcessingComplete: 'Sikeres feltöltés',
labelFileProcessingAborted: 'A feltöltés megszakítva',
labelFileProcessingError: 'Hiba történt a feltöltés során',
labelFileProcessingRevertError: 'Hiba a visszaállítás során',
labelFileRemoveError: 'Hiba történt az eltávolítás során',
labelTapToCancel: 'koppints a törléshez',
labelTapToRetry: 'koppints az újrakezdéshez',
labelTapToUndo: 'koppints a visszavonáshoz',
labelButtonRemoveItem: 'Eltávolítás',
labelButtonAbortItemLoad: 'Megszakítás',
labelButtonRetryItemLoad: 'Újrapróbálkozás',
labelButtonAbortItemProcessing: 'Megszakítás',
labelButtonUndoItemProcessing: 'Visszavonás',
labelButtonRetryItemProcessing: 'Újrapróbálkozás',
labelButtonProcessItem: 'Feltöltés',
labelMaxFileSizeExceeded: 'A fájl túllépte a maximális méretet',
labelMaxFileSize: 'Maximális fájlméret: {filesize}',
labelMaxTotalFileSizeExceeded: 'Túllépte a maximális teljes méretet',
labelMaxTotalFileSize: 'A maximáis teljes fájlméret: {filesize}',
labelFileTypeNotAllowed: 'Érvénytelen típusú fájl',
fileValidateTypeLabelExpectedTypes: 'Engedélyezett típusok {allButLastType} vagy {lastType}',
imageValidateSizeLabelFormatError: 'A képtípus nem támogatott',
imageValidateSizeLabelImageSizeTooSmall: 'A kép túl kicsi',
imageValidateSizeLabelImageSizeTooBig: 'A kép túl nagy',
imageValidateSizeLabelExpectedMinSize: 'Minimum méret: {minWidth} × {minHeight}',
imageValidateSizeLabelExpectedMaxSize: 'Maximum méret: {maxWidth} × {maxHeight}',
imageValidateSizeLabelImageResolutionTooLow: 'A felbontás túl alacsony',
imageValidateSizeLabelImageResolutionTooHigh: 'A felbontás túl magas',
imageValidateSizeLabelExpectedMinResolution: 'Minimáis felbontás: {minResolution}',
imageValidateSizeLabelExpectedMaxResolution: 'Maximális felbontás: {maxResolution}'
};
39 changes: 39 additions & 0 deletions locale/id-id.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
export default {
labelIdle: 'Seret dan Jatuhkan file Anda atau <span class="filepond--label-action">Jelajahi</span>',
labelInvalidField: 'Field berisi file tidak valid',
labelFileWaitingForSize: 'Menunggu ukuran',
labelFileSizeNotAvailable: 'Ukuran tidak tersedia',
labelFileLoading: 'Memuat',
labelFileLoadError: 'Kesalahan saat memuat',
labelFileProcessing: 'Mengunggah',
labelFileProcessingComplete: 'Unggahan selesai',
labelFileProcessingAborted: 'Unggahan dibatalkan',
labelFileProcessingError: 'Kesalahan saat mengunggah',
labelFileProcessingRevertError: 'Kesalahan saat pengembalian',
labelFileRemoveError: 'Kesalahan saat menghapus',
labelTapToCancel: 'ketuk untuk membatalkan',
labelTapToRetry: 'ketuk untuk mencoba lagi',
labelTapToUndo: 'ketuk untuk mengurungkan',
labelButtonRemoveItem: 'Hapus',
labelButtonAbortItemLoad: 'Batal',
labelButtonRetryItemLoad: 'Coba Kembali',
labelButtonAbortItemProcessing: 'Batal',
labelButtonUndoItemProcessing: 'Batal',
labelButtonRetryItemProcessing: 'Coba Kembali',
labelButtonProcessItem: 'Unggah',
labelMaxFileSizeExceeded: 'File terlalu besar',
labelMaxFileSize: 'Ukuran file maksimum adalah {filesize}',
labelMaxTotalFileSizeExceeded: 'Jumlah file maksimum terlampaui',
labelMaxTotalFileSize: 'Jumlah file maksimum adalah {filesize}',
labelFileTypeNotAllowed: 'Jenis file tidak valid',
fileValidateTypeLabelExpectedTypes: 'Mengharapkan {allButLastType} atau {lastType}',
imageValidateSizeLabelFormatError: 'Jenis gambar tidak didukung',
imageValidateSizeLabelImageSizeTooSmall: 'Gambar terlalu kecil',
imageValidateSizeLabelImageSizeTooBig: 'Gambar terlalu besar',
imageValidateSizeLabelExpectedMinSize: 'Ukuran minimum adalah {minWidth} × {minHeight}',
imageValidateSizeLabelExpectedMaxSize: 'Ukuran maksimum adalah {minWidth} × {minHeight}',
imageValidateSizeLabelImageResolutionTooLow: 'Resolusi terlalu rendah',
imageValidateSizeLabelImageResolutionTooHigh: 'Resolusi terlalu tinggi',
imageValidateSizeLabelExpectedMinResolution: 'Resolusi minimum adalah {minResolution}',
imageValidateSizeLabelExpectedMaxResolution: 'Resolusi maksimum adalah {maxResolution}'
};
39 changes: 39 additions & 0 deletions locale/it-it.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
export default {
labelIdle: 'Trascina e rilascia i tuoi file oppure <span class = "filepond--label-action"> Carica <span>',
labelInvalidField: "Il campo contiene dei file non validi",
labelFileWaitingForSize: "Aspettando le dimensioni",
labelFileSizeNotAvailable: "Dimensioni non disponibili",
labelFileLoading: "Caricamento",
labelFileLoadError: "Errore durante il caricamento",
labelFileProcessing: "Caricamento",
labelFileProcessingComplete: "Caricamento completato",
labelFileProcessingAborted: "Caricamento cancellato",
labelFileProcessingError: "Errore durante il caricamento",
labelFileProcessingRevertError: "Errore durante il ripristino",
labelFileRemoveError: "Errore durante l'eliminazione",
labelTapToCancel: "tocca per cancellare",
labelTapToRetry: "tocca per riprovare",
labelTapToUndo: "tocca per ripristinare",
labelButtonRemoveItem: "Elimina",
labelButtonAbortItemLoad: "Cancella",
labelButtonRetryItemLoad: "Ritenta",
labelButtonAbortItemProcessing: "Camcella",
labelButtonUndoItemProcessing: "Indietro",
labelButtonRetryItemProcessing: "Ritenta",
labelButtonProcessItem: "Carica",
labelMaxFileSizeExceeded: "Il peso del file è eccessivo",
labelMaxFileSize: "Il peso massimo del file è {filesize}",
labelMaxTotalFileSizeExceeded: "Dimensione totale massima superata",
labelMaxTotalFileSize: "La dimensione massima totale del file è {filesize}",
labelFileTypeNotAllowed: "File non supportato",
fileValidateTypeLabelExpectedTypes: "Aspetta {allButLastType} o {lastType}",
imageValidateSizeLabelFormatError: "Tipo di immagine non compatibile",
imageValidateSizeLabelImageSizeTooSmall: "L'immagine è troppo piccola",
imageValidateSizeLabelImageSizeTooBig: "L'immagine è troppo grande",
imageValidateSizeLabelExpectedMinSize: "La dimensione minima è {minWidth} × {minHeight}",
imageValidateSizeLabelExpectedMaxSize: "La dimensione massima è {maxWidth} × {maxHeight}",
imageValidateSizeLabelImageResolutionTooLow: "La risoluzione è troppo bassa",
imageValidateSizeLabelImageResolutionTooHigh: "La risoluzione è troppo alta",
imageValidateSizeLabelExpectedMinResolution: "La risoluzione minima è {minResolution}",
imageValidateSizeLabelExpectedMaxResolution: "La risoluzione massima è {maxResolution}",
};
6 changes: 3 additions & 3 deletions src/js/app/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ export const actions = (dispatch, query, state) => ({
.then(doUpload ? upload : () => {});
}

// if we should re-upload the file immidiately
// if we should re-upload the file immediately
if (item.status === ItemStatus.PROCESSING_COMPLETE) {
return revert(state.options.instantUpload);
}
Expand Down Expand Up @@ -682,7 +682,7 @@ export const actions = (dispatch, query, state) => ({
return;
}

// id we are allowed to upload the file immidiately, lets do it
// id we are allowed to upload the file immediately, lets do it
if (query('IS_ASYNC') && state.options.instantUpload) {
dispatch('REQUEST_ITEM_PROCESSING', { query: item.id });
}
Expand Down Expand Up @@ -944,7 +944,7 @@ export const actions = (dispatch, query, state) => ({

REQUEST_REVERT_ITEM_PROCESSING: getItemByQueryFromState(state, item => {

// not instant uploading, revert immidiately
// not instant uploading, revert immediately
if (!state.options.instantUpload) {
dispatch('REVERT_ITEM_PROCESSING', { query: item });
return;
Expand Down
2 changes: 1 addition & 1 deletion src/js/app/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export const defaultOptions = {
ignoredFiles: [['.ds_store', 'thumbs.db', 'desktop.ini'], Type.ARRAY],

// Upload related
instantUpload: [true, Type.BOOLEAN], // Should upload files immidiately on drop
instantUpload: [true, Type.BOOLEAN], // Should upload files immediately on drop
maxParallelUploads: [2, Type.INT], // Maximum files to upload in parallel

// Chunks
Expand Down
2 changes: 1 addition & 1 deletion src/js/app/utils/requestDataTransferItems.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { getExtensionFromFilename } from '../../utils/getExtensionFromFilename';

export const requestDataTransferItems = dataTransfer =>
new Promise((resolve, reject) => {
// try to get links from transfer, if found we'll exit immidiately (unless a file is in the dataTransfer as well, this is because Firefox could represent the file as a URL and a file object at the same time)
// try to get links from transfer, if found we'll exit immediately (unless a file is in the dataTransfer as well, this is because Firefox could represent the file as a URL and a file object at the same time)
const links = getLinks(dataTransfer);
if (links.length && !hasFiles(dataTransfer)) {
return resolve(links);
Expand Down
4 changes: 2 additions & 2 deletions src/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const isIE11 = () => /MSIE|Trident/.test(window.navigator.userAgent);

export const supported = (() => {

// Runs immidiately and then remembers result for subsequent calls
// Runs immediately and then remembers result for subsequent calls
const isSupported =

// Has to be a browser
Expand Down Expand Up @@ -208,4 +208,4 @@ if (supported()) {
// return new options
return getOptions();
};
}
}

0 comments on commit 95cc575

Please sign in to comment.